From 3dc4bb8e345d7470c6647feed18fdc00c8b7ea44 Mon Sep 17 00:00:00 2001 From: Chen <61995987@qq.com> Date: Thu, 12 Mar 2026 03:42:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86shell=E8=B0=83=E7=94=A8=E6=97=B6?= =?UTF-8?q?=E7=9A=84timeout=E8=BD=AC=E4=B8=BAint=20=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE=E6=97=B6=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E4=BC=A0=E9=80=92umo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/computer/tools/shell.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/astrbot/core/computer/tools/shell.py b/astrbot/core/computer/tools/shell.py index 64ce60daa..d48260317 100644 --- a/astrbot/core/computer/tools/shell.py +++ b/astrbot/core/computer/tools/shell.py @@ -58,8 +58,10 @@ class ExecuteShellTool(FunctionTool): context.context.event.unified_msg_origin, ) try: - config = context.context.context.get_config() + config = context.context.context.get_config(umo=context.context.event.unified_msg_origin) timeout = config.get("provider_settings", {}).get("shell_call_timeout", 30) + # 将timeout转为int + timeout = int(timeout) result = await sb.shell.exec(command, background=background, env=env, timeout=timeout) return json.dumps(result)