fix: prohibit repeated reading of the file (#1708)

This commit is contained in:
yetone
2025-03-25 15:54:47 +08:00
committed by GitHub
parent 976fb4177c
commit f84cb2896d
6 changed files with 26 additions and 9 deletions

View File

@@ -536,7 +536,8 @@ function M._stream(opts)
return handle_next_tool_use(tool_use_list, tool_use_index + 1, tool_histories)
end
-- Either on_complete handles the tool result asynchronously or we receive the result and error synchronously when either is not nil
local result, error = LLMTools.process_tool_use(opts.tools, tool_use, opts.on_tool_log, handle_tool_result)
local result, error =
LLMTools.process_tool_use(opts.tools, tool_use, opts.on_tool_log, handle_tool_result, opts.session_ctx)
if result ~= nil or error ~= nil then return handle_tool_result(result, error) end
end
if stop_opts.reason == "cancelled" then