From 2a9a51562bbd23776873dab73f6675de30bb7fea Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Mon, 20 Jul 2026 15:46:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(terminal):=20=E7=A7=BB=E9=99=A4=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E6=89=A7=E8=A1=8C=E5=89=8D=E7=9A=84=20/Library/Develo?= =?UTF-8?q?per/CommandLineTools/Library/Frameworks/Python3.framework/Versi?= =?UTF-8?q?ons/3.9/bin/python3.9/pip=20=E8=B7=AF=E5=BE=84=E9=87=8D?= =?UTF-8?q?=E5=86=99=EF=BC=8C=E6=8C=89=E7=94=A8=E6=88=B7=E5=8E=9F=E5=A7=8B?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit run_command 与后台 run_command 此前会把命令中的 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3.9//Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3.9/pip/pip3 正则替换为解析出的容器或本地解释器路径,删除该重写逻辑后命令按原样执行。 --- static/src/app/computed.ts | 4 +++- static/src/app/methods/message/send.ts | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/static/src/app/computed.ts b/static/src/app/computed.ts index bef9e19b..485128f5 100644 --- a/static/src/app/computed.ts +++ b/static/src/app/computed.ts @@ -215,7 +215,9 @@ export const computed = { return !!this.policyUiBlocks.block_virtual_monitor; }, displayLockEngaged() { - return !!this.compressionInProgress || !!this.compressing || !!this.currentWorkspaceHasRunningTask; + // 对话级并行后:运行中的任务不再硬锁输入栏——当前对话需要保持可输入以排队/停止, + // 其他对话需要保持可输入以并行运行。仅压缩期间保持锁定。 + return !!this.compressionInProgress || !!this.compressing; }, currentWorkspaceHasRunningTask() { // 对话级隔离后:仅当「当前对话」有运行中任务时才拦截发送; diff --git a/static/src/app/methods/message/send.ts b/static/src/app/methods/message/send.ts index 914e3418..86a4d90f 100644 --- a/static/src/app/methods/message/send.ts +++ b/static/src/app/methods/message/send.ts @@ -22,14 +22,6 @@ export const sendMethods = { const hasMedia = (Array.isArray(this.selectedImages) && this.selectedImages.length > 0) || (Array.isArray(this.selectedVideos) && this.selectedVideos.length > 0); - if (this.currentWorkspaceHasRunningTask) { - this.uiPushToast({ - title: '当前对话正在运行', - message: '请等待当前对话任务完成后再发送新消息;同工作区的其他对话可正常并行。', - type: 'warning' - }); - return; - } // 主对话空闲但 composerBusy=true:composerBusy 只因后台子智能体在跑而保持。 // 传统模式:waitingForSubAgent=true(taskInProgress=true 。多智能体模式:has_running_multi_agent=true。 // 此时新文本消息应直接发送,触发主智能体下一轮工作,而不是被进队列等任务结束。 @@ -91,6 +83,16 @@ export const sendMethods = { } this.stopTask(); } else { + // 对账安全网:REST 对账显示当前对话仍在运行、但本地流式状态尚未恢复(如刚刷新页面)时, + // 阻止直接发起新任务(后端同对话互斥会 409)。排队/停止走上方 composerBusy 分支,不受此守卫影响。 + if (this.currentWorkspaceHasRunningTask) { + this.uiPushToast({ + title: '当前对话正在运行', + message: '请等待当前对话任务完成后再发送新消息;同工作区的其他对话可正常并行。', + type: 'warning' + }); + return; + } this.sendMessage(); } },