fix: attempt_completion ignore open command (#2151)
This commit is contained in:
@@ -72,7 +72,8 @@ function M.func(opts, on_log, on_complete, session_ctx)
|
||||
local sidebar = require("avante").get()
|
||||
if not sidebar then return false, "Avante sidebar not found" end
|
||||
session_ctx.attempt_completion_is_called = true
|
||||
if opts.command and opts.command ~= "" and opts.command ~= vim.NIL then
|
||||
if opts.command and opts.command ~= vim.NIL and opts.command ~= "" and not vim.startswith(opts.command, "open ") then
|
||||
session_ctx.always_yes = false
|
||||
require("avante.llm_tools.bash").func({ command = opts.command }, on_log, on_complete, session_ctx)
|
||||
else
|
||||
on_complete(true, nil)
|
||||
|
||||
Reference in New Issue
Block a user