fix: ignore error when reading file from tool_use (#2083)
This commit is contained in:
@@ -291,8 +291,7 @@ function M.generate_prompts(opts)
|
|||||||
item.content =
|
item.content =
|
||||||
string.format("The file %s has been updated. Please use the latest `view` tool result!", path)
|
string.format("The file %s has been updated. Please use the latest `view` tool result!", path)
|
||||||
else
|
else
|
||||||
local lines, error = Utils.read_file_from_buf_or_disk(path)
|
local lines = Utils.read_file_from_buf_or_disk(path)
|
||||||
if error ~= nil then Utils.error("error reading file: " .. error) end
|
|
||||||
lines = lines or {}
|
lines = lines or {}
|
||||||
item.content = table.concat(lines, "\n")
|
item.content = table.concat(lines, "\n")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user