Fix: Ensure UTF-8 encoding for all file operations

This commit is contained in:
chtangwin
2026-02-10 17:31:45 +08:00
parent 8de36d398f
commit c7b5dd9350
5 changed files with 13 additions and 11 deletions

View File

@@ -206,7 +206,7 @@ class AgentLoop:
"type": "function",
"function": {
"name": tc.name,
"arguments": json.dumps(tc.arguments)
"arguments": json.dumps(tc.arguments, ensure_ascii=False)
}
}
for tc in response.tool_calls
@@ -388,6 +388,7 @@ class AgentLoop:
)
final_content, _ = await self._run_agent_loop(initial_messages)
if final_content is None:
final_content = "Background task completed."