fix(console): 侧栏项目 agent 徽标改用 s.running,修复 planner/spec 阶段徽标缺失 (tsk_0u7OP3RFBAqr)
侧栏项目 agent 计数徽标原绑定 s.executing(仅统计任务恰处 executing 状态), 与「运行中」青点(s.running)及 tooltip『N agents running』语义不一致。 当 Hard(analyzing/planner) 或 Medium(speccing) 任务有在途 agent 时,s.executing=0 导致徽标缺失(如 maestro 项目)。改取 s.running(runs.status=started,覆盖各阶段)。 新增 test/adapt.test.ts 锁定该映射。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -25,7 +25,10 @@ export function adaptProject(p) {
|
||||
return {
|
||||
id: p.id, name: p.name, path: shortPath(p.repoPath), branch: p.defaultBranch,
|
||||
autonomy: p.autonomy, concurrency: p.concurrency, hue: hueFor(p.name),
|
||||
state, pending: s.attention || 0, agents: s.executing || 0, blocked: s.blocked || 0,
|
||||
// agents 徽标 = 实际在途 agent 数(runs.status='started',含 planner/spec/executor 各阶段),
|
||||
// 与「运行中」青点同源(s.running);不可用 s.executing——那只统计任务恰处 executing 状态,
|
||||
// 会漏掉 analyzing(planner)/speccing(spec) 阶段正在跑的 agent,导致徽标缺失。
|
||||
state, pending: s.attention || 0, agents: s.running || 0, blocked: s.blocked || 0,
|
||||
// 透传给 ConfigPanel 用的原始字段
|
||||
model: p.model, verifyCmd: p.verifyCmd, maxRetries: p.maxRetries, repoPath: p.repoPath,
|
||||
logo: p.logo, budgetUsd: p.budgetUsd ?? null, budgetPeriod: p.budgetPeriod ?? 'month',
|
||||
|
||||
Reference in New Issue
Block a user