From ef61ba52c0117512a0dfecfaa6392d578de62a87 Mon Sep 17 00:00:00 2001 From: yetone Date: Tue, 20 May 2025 11:47:46 +0800 Subject: [PATCH] fix: do not modify the failed view tool_result (#2055) --- lua/avante/llm.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/avante/llm.lua b/lua/avante/llm.lua index 2059617..866da22 100644 --- a/lua/avante/llm.lua +++ b/lua/avante/llm.lua @@ -283,6 +283,7 @@ function M.generate_prompts(opts) if item.type ~= "tool_result" then goto continue end local tool_name = tool_id_to_tool_name[item.tool_use_id] if tool_name ~= "view" then goto continue end + if item.is_error then goto continue end local path = tool_id_to_path[item.tool_use_id] local latest_tool_id = viewed_files[path] if not latest_tool_id then goto continue end