group activity entries by plan step + remove inline renderers from chat
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled
Desktop App / Build Linux (amd64) (push) Has been cancelled
Desktop App / Attach to Release (push) Has been cancelled

- Tool calls in Activity timeline are now tagged with current plan step
- Indented entries show which step they belong to
- Step tracking via update_plan_step(status=running) tool calls
- Removed inline tool renderers from chat (health summary, fleet snapshot, etc.)
  — all tool output now visible only in sidebar Activity timeline
This commit is contained in:
2026-07-14 12:38:02 +02:00
parent c8c7705046
commit 44720b7b30
4 changed files with 21 additions and 19 deletions

View File

@@ -13,6 +13,8 @@ export interface ActivityEntry {
detail?: string
timestamp: number
toolName?: string
stepSeq?: number
indent?: boolean
status: 'running' | 'done' | 'failed'
}
@@ -39,11 +41,23 @@ export const activityLog = derived([messages, planSteps, currentTask], ([$msgs,
})
}
// Tool calls (from messages)
// Tool calls (from messages). Tag each tool with the plan step that's
// currently running when it fires.
let currentStepSeq = 0
let entryIdx = 0
for (let mi = 0; mi < $msgs.length; mi++) {
for (const t of $msgs[mi].tools) {
// Track current step from update_plan_step calls
if (t.type === 'tool_use' && t.name === 'update_plan_step') {
const s = (t.args as any)?.seq as number | undefined
const status = (t.args as any)?.status as string | undefined
if (s && status === 'running') currentStepSeq = s
} else if (t.name === 'set_goal' || t.name === 'propose_plan' || t.name === 'complete_task') {
currentStepSeq = 0
}
const label = toolActivityLabel(t)
const stepTag = currentStepSeq > 0 ? currentStepSeq : undefined
if (t.type === 'tool_use') {
entries.push({
id: t.id ?? `tool_${mi}_${entryIdx++}`,
@@ -51,10 +65,11 @@ export const activityLog = derived([messages, planSteps, currentTask], ([$msgs,
description: label,
timestamp: now - ($msgs.length - mi) * 1000,
toolName: t.name,
stepSeq: stepTag,
indent: stepTag != null,
status: 'running'
})
} else if (t.type === 'tool_result') {
// Find and update matching tool_use entry
const running = entries.find((e) =>
e.type === 'tool_running' && e.id === t.id && e.status === 'running'
)
@@ -76,6 +91,8 @@ export const activityLog = derived([messages, planSteps, currentTask], ([$msgs,
detail: !t.error ? (typeof t.result === 'string' ? t.result.slice(0, 200) : '') : undefined,
timestamp: now - ($msgs.length - mi) * 1000,
toolName: t.name,
stepSeq: stepTag,
indent: stepTag != null,
status: t.error ? 'failed' : 'done'
})
}