fix: resolve path inconsistency between code_run and file_read

This commit is contained in:
Liang Jiaqing
2026-01-29 20:06:09 +08:00
parent b25e091404
commit 35ce8f7c9e
4 changed files with 16 additions and 13 deletions

View File

@@ -51,7 +51,7 @@ def agent_runner_loop(client, system_prompt, user_input, handler, tools_schema,
if '</summary>```' in response.content: response.content = response.content.replace('</summary>```', '</summary> \n```')
showcontent = response.content
if '</file_content>' in showcontent:
showcontent = re.sub(r'<file_content>\s*(.*?)\s*</file_content>', r'\n```` <file_content>\n\1\n</file_content> ````', showcontent, flags=re.DOTALL)
showcontent = re.sub(r'<file_content>\s*(.*?)\s*</file_content>', r'\n````\n<file_content>\n\1\n</file_content>\n````', showcontent, flags=re.DOTALL)
yield showcontent + '\n\n'
if not response.tool_calls: