From c612921b213f7fe79748ea8ea45ad6a0fe21990a Mon Sep 17 00:00:00 2001 From: Aaron Pham Date: Fri, 16 Aug 2024 02:19:08 -0400 Subject: [PATCH] fix: make sure to apply if has diff Signed-off-by: Aaron Pham --- lua/avante/ai_bot.lua | 4 ++-- lua/avante/sidebar.lua | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/avante/ai_bot.lua b/lua/avante/ai_bot.lua index 921ab1223..5de278c5d 100644 --- a/lua/avante/ai_bot.lua +++ b/lua/avante/ai_bot.lua @@ -113,7 +113,7 @@ local function call_claude_api_stream(question, code_lang, code_content, on_chun local url = utils.trim_suffix(config.get().claude.endpoint, "/") .. "/v1/messages" - print("Sending request to Claude API...") + -- print("Sending request to Claude API...") curl.post(url, { ---@diagnostic disable-next-line: unused-local @@ -210,7 +210,7 @@ local function call_openai_api_stream(question, code_lang, code_content, on_chun } end - print("Sending request to " .. (config.get().provider == "azure" and "Azure OpenAI" or "OpenAI") .. " API...") + -- print("Sending request to " .. (config.get().provider == "azure" and "Azure OpenAI" or "OpenAI") .. " API...") curl.post(url, { ---@diagnostic disable-next-line: unused-local diff --git a/lua/avante/sidebar.lua b/lua/avante/sidebar.lua index 829f9dbfd..3e0ad2b44 100644 --- a/lua/avante/sidebar.lua +++ b/lua/avante/sidebar.lua @@ -582,6 +582,8 @@ function Sidebar:render() -- Save chat history table.insert(chat_history or {}, { timestamp = timestamp, requirement = user_input, response = full_response }) save_chat_history(self, chat_history) + + apply() end) end