feat: refine vision processing logic and update SOP

This commit is contained in:
Liang Jiaqing
2026-01-31 15:47:23 +08:00
parent 01c477c050
commit 669095699e
4 changed files with 40 additions and 21 deletions

View File

@@ -48,8 +48,8 @@ def agent_runner_loop(client, system_prompt, user_input, handler, tools_schema,
response = client.chat(messages=messages, tools=tools_schema)
if response.thinking: yield '<thinking>' + response.thinking + '</thinking>\n\n'
if '</summary>```' in response.content: response.content = response.content.replace('</summary>```', '</summary>\n```')
showcontent = response.content
if '</summary>' in showcontent: showcontent = showcontent.replace('</summary>', '</summary>\n\n')
if '</file_content>' in showcontent:
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'