fix: ensure JSON response is encoded with non-ASCII characters for shell command execution (#7475)

fixes: #7452
This commit is contained in:
Soulter
2026-04-12 14:01:20 +08:00
committed by GitHub
parent 5f95bbc422
commit 8d28693e32

View File

@@ -73,6 +73,6 @@ class ExecuteShellTool(FunctionTool):
background=background,
env=env,
)
return json.dumps(result)
return json.dumps(result, ensure_ascii=False)
except Exception as e:
return f"Error executing command: {str(e)}"