新增: 挂机模式 P1 总装: 设置面板+顶栏徽章+边界卡精简+监控告警推送

- 新增 UnattendedPanel.vue 挂机配置面板(引擎自动认领看板任务,Settings KV 热读即改即生效)
- Settings.vue 接入挂机面板;searchIndex.ts 补挂机搜索词条
- TopBar.vue 新增挂机进行中徽章(脉冲动效+透明度过渡)
- TaskBoundaryCard.vue 精简边界状态判定(wallState 合并比对,删冗余 watch)
- i18n zh-CN/en: settings/ai/aiChat 六文件补挂机词条双语
- unattended.rs 新增 push_monitor_alert 监控告警推送(异常快照+告警头直发 monitor_chat)
- feishu_notify.rs push/push_card 出口重构收敛
- lib.rs 注册 unattended_status/unattended_set_enabled 两 IPC
- aiShared.ts/useAiStreamingEvents.ts 挂机状态流接入
This commit is contained in:
lxy
2026-10-07 22:03:41 +08:00
parent e60bd38444
commit 2441101978
16 changed files with 525 additions and 264 deletions
+14 -6
View File
@@ -49,12 +49,20 @@ export function handleStreamingEvent(event: AiChatEvent): boolean {
flushCurrentText()
state.currentText = ''
clearTextIdleTimer()
state.messages.push({
id: `ai-${nextMsgId()}` as MessageId,
role: 'assistant',
content: '',
timestamp: Date.now(),
})
// 防空气泡叠罗汉(BUG-2026-10-07):flush 后若末条仍是「空 content 且非 isError 的
// assistant 气泡」,说明上一轮 LLM 只发 tool_calls 无文本(工具结果在 toolCalls 桶不在
// content),直接复用该气泡承接本轮,不再新推——否则纯工具轮每轮推一个空气泡,
// 折叠后尾泡渲染成「空气泡+光标」(BUG-260624 表症根因之二)。
const tail = state.messages[state.messages.length - 1]
const reusableTail = tail && tail.role === 'assistant' && !tail.isError && !tail.content?.trim()
if (!reusableTail) {
state.messages.push({
id: `ai-${nextMsgId()}` as MessageId,
role: 'assistant',
content: '',
timestamp: Date.now(),
})
}
// round>0 才更新进度条(round=0 是审批通过后「隔开新一轮」的占位,实际轮次未推进,防闪烁)
if (event.round > 0) state.agentRound = event.round
// #14 桌面任务卡:per-conv 轮次追踪,前台会话在此写(取 max 防事件乱序回退);