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)