fix(static): 对话级并行后调整输入栏锁定与发送守卫

- displayLockEngaged 不再因当前对话有运行中任务而硬锁输入栏,仅压缩期间锁定;
- 同对话运行守卫后移到 composerBusy 分支之后,避免刷新后对账未恢复时误发新任务。
This commit is contained in:
JOJO 2026-07-20 15:51:21 +08:00
parent bfc039a9a9
commit cb877b4b67
2 changed files with 13 additions and 9 deletions

View File

@ -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() {
// 对话级隔离后:仅当「当前对话」有运行中任务时才拦截发送;

View File

@ -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=truecomposerBusy 只因后台子智能体在跑而保持。
// 传统模式waitingForSubAgent=truetaskInProgress=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();
}
},