fix: 去掉 git 前缀误剃

This commit is contained in:
yumoqing 2026-08-05 18:02:45 +08:00
parent 528b5a7cb6
commit 1d22da86ac

View File

@ -879,7 +879,7 @@ if action == 'send_message':
description = intent.get('description', '') or message_text description = intent.get('description', '') or message_text
# 去掉中文前缀("执行命令:"、"运行:"等) # 去掉中文前缀("执行命令:"、"运行:"等)
import re import re
description = re.sub(r'^(执行命令[:]|运行[:]|git\s+)', '', description.strip()) description = re.sub(r'^(执行命令[:]|运行[:])', '', description.strip())
workdir = ctx.get('workspace_dir', '') or '/d/pipeline/workspaces' workdir = ctx.get('workspace_dir', '') or '/d/pipeline/workspaces'
result = await shell_exec(description, workdir=workdir) result = await shell_exec(description, workdir=workdir)
if result['rc'] == 0: if result['rc'] == 0: