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

@@ -146,7 +146,7 @@ class SubagentManager:
"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
@@ -159,7 +159,7 @@ class SubagentManager:
# Execute tools
for tool_call in response.tool_calls:
args_str = json.dumps(tool_call.arguments)
args_str = json.dumps(tool_call.arguments, ensure_ascii=False)
logger.debug(f"Subagent [{task_id}] executing: {tool_call.name} with arguments: {args_str}")
result = await tools.execute(tool_call.name, tool_call.arguments)
messages.append({