From b558408b5bbe1d1080e62ffb2c5e61fd4e541c73 Mon Sep 17 00:00:00 2001 From: yetone Date: Wed, 18 Jun 2025 15:12:16 +0800 Subject: [PATCH] fix: avoid freeze confirmation window (#2255) --- lua/avante/llm_tools/helpers.lua | 1 + 1 file changed, 1 insertion(+) 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)