From 0e7d66333d584b93084fe0750687c4eaec52af92 Mon Sep 17 00:00:00 2001 From: yetone Date: Mon, 26 May 2025 18:53:02 +0800 Subject: [PATCH] fix: ignore error when reading file from tool_use (#2083) --- lua/avante/llm.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/avante/llm.lua b/lua/avante/llm.lua index 866da22..d892755 100644 --- a/lua/avante/llm.lua +++ b/lua/avante/llm.lua @@ -291,8 +291,7 @@ function M.generate_prompts(opts) item.content = string.format("The file %s has been updated. Please use the latest `view` tool result!", path) else - local lines, error = Utils.read_file_from_buf_or_disk(path) - if error ~= nil then Utils.error("error reading file: " .. error) end + local lines = Utils.read_file_from_buf_or_disk(path) lines = lines or {} item.content = table.concat(lines, "\n") end