fix(agent): 同步委派子会话进度状态【已审核 PR】#1292
Open
Andreaseszhang wants to merge 1 commit into
Open
Conversation
Made-with: Proma
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
父会话左侧栏原先仅按持久化
delegationStatus === 'completed'统计子会话,导致原委派已取消、但子会话随后直接重跑时,父会话摘要仍显示过期进度。本 PR 将摘要与子会话的实时状态统一,使运行、停止与完成能立即反映到父会话。改动
apps/electron/src/renderer/lib/agent-session-list.ts— 提取委派子会话状态解析与已停止计数函数;实时 indicator 优先,应用重启时才以持久化running作为兜底。apps/electron/src/renderer/components/app-shell/LeftSidebar.tsx— 三个父会话列表入口统一改用实时 settled 计数,并让树状态与摘要复用同一状态解析规则。apps/electron/src/renderer/lib/agent-session-list.test.ts— 覆盖取消后重跑、运行/阻塞状态以及重启后持久化 running 的回归场景。测试方法
bun test apps/electron/src/renderer/lib/agent-session-list.test.ts,确认 12 项测试通过。bun run typecheck,确认全部 workspace package 类型检查通过。apps/electron执行bun run build:renderer,确认 renderer production build 通过。x/y在运行时递减、结束后恢复;打开已完成会话后计数不回退。备注
Made with Proma · GitHub