From 8d28693e3299463b64748c8ce5ba7170a5fab637 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Sun, 12 Apr 2026 14:01:20 +0800 Subject: [PATCH] fix: ensure JSON response is encoded with non-ASCII characters for shell command execution (#7475) fixes: #7452 --- astrbot/core/tools/computer_tools/shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astrbot/core/tools/computer_tools/shell.py b/astrbot/core/tools/computer_tools/shell.py index 2d3997387..af933e83b 100644 --- a/astrbot/core/tools/computer_tools/shell.py +++ b/astrbot/core/tools/computer_tools/shell.py @@ -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)}"