diff --git a/lua/avante/llm_tools/helpers.lua b/lua/avante/llm_tools/helpers.lua index 6d35454..00501ff 100644 --- a/lua/avante/llm_tools/helpers.lua +++ b/lua/avante/llm_tools/helpers.lua @@ -54,6 +54,7 @@ function M.confirm(message, callback, confirm_opts, session_ctx, tool_name) return end confirm_opts = vim.tbl_deep_extend("force", { container_winid = sidebar.input_container.winid }, confirm_opts or {}) + if M.confirm_popup then M.confirm_popup:close() end M.confirm_popup = Confirm:new(message, function(type, reason) if type == "yes" then callback(true)