From 9c84c3dcbc535d0eb142efed8c1ede77f495afea Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 6 Aug 2026 14:19:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20git=20clone=20=E6=93=8D=E4=BD=9C=20timeo?= =?UTF-8?q?ut=20=E8=AE=BE=E4=B8=BA=20120s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/api/cockpit_chat.dspy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wwwroot/api/cockpit_chat.dspy b/wwwroot/api/cockpit_chat.dspy index 48086f4..385ac21 100644 --- a/wwwroot/api/cockpit_chat.dspy +++ b/wwwroot/api/cockpit_chat.dspy @@ -895,7 +895,7 @@ if action == 'send_message': # 特殊处理:包含"到本地""到工作区"→只保留 git clone url cmd = re.sub(r'(\s+(到本地|到工作区|到workspace).*)', '', cmd).strip() workdir = ctx.get('workspace_dir', '') or '/d/pipeline/workspaces' - result = await shell_exec(cmd, workdir=workdir) + result = await shell_exec(cmd, workdir=workdir, timeout=120 if 'git clone' in cmd else 60) if result['rc'] == 0: out = result['stdout'].strip() agent_reply = f"执行成功。{'输出:' + out[:500] if out else '(无输出)'}"