From 3a96c1f9c79cbbf918527ccf3d150d1c5ecc352f Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 20 Mar 2025 19:27:32 +0800 Subject: [PATCH] fix: do not asynchronously store history messages (#1654) --- lua/avante/sidebar.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/avante/sidebar.lua b/lua/avante/sidebar.lua index 6db5ec1..0e22224 100644 --- a/lua/avante/sidebar.lua +++ b/lua/avante/sidebar.lua @@ -2233,13 +2233,12 @@ function Sidebar:add_chat_history(message, options) reset_memory = false, visible = options.visible, }) + Path.history.save(self.code.bufnr, self.chat_history) if self.chat_history.title == "untitled" then Llm.summarize_chat_thread_title(message.content, function(title) if title then self.chat_history.title = title end Path.history.save(self.code.bufnr, self.chat_history) end) - else - Path.history.save(self.code.bufnr, self.chat_history) end end