fix: gemini ReAct (#2132)

This commit is contained in:
yetone
2025-06-04 01:14:06 +08:00
committed by GitHub
parent fe8e34ce86
commit fc0e78e88f
7 changed files with 46 additions and 24 deletions

View File

@@ -57,8 +57,8 @@ M.returns = {
---@type AvanteLLMToolFunc<{ path: string, old_str: string, new_str: string, streaming?: boolean, tool_use_id?: string }>
function M.func(opts, on_log, on_complete, session_ctx)
local replace_in_file = require("avante.llm_tools.replace_in_file")
local diff = "<<<<<<< SEARCH\n" .. opts.old_str .. "\n=======\n" .. opts.new_str
if not opts.streaming then diff = diff .. "\n>>>>>>> REPLACE" end
local diff = "------- SEARCH\n" .. opts.old_str .. "\n=======\n" .. opts.new_str
if not opts.streaming then diff = diff .. "\n+++++++ REPLACE" end
local new_opts = {
path = opts.path,
diff = diff,