#60: live turn progress (activity line + token count + OutputChannel stream + cancel) #61
Reference in New Issue
Block a user
Delete Branch "s60-live-progress"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements #60 — surface Claude's live output/progress during the opaque "asking Claude…" status. Built from the graduated Solution Design
coauthoring-live-progress.md(brainstorming session 0055).What
Both Ask-Claude entry points (
editSelection+ the previewaskClaude) ran the turn as one opaque promise. Now, while a turn runs:thinking…→writing… (N chars)→running <tool>…, plus a running token count (· 1.2k tokens);cowriting.liveProgress.revealOutputsetting; appends per-turn);agent.abort()→ "cancelled", proposing nothing.The
@cline/sdkalready streamed all of this (assistant-text-delta,tool-*,usage-updated) viaagent.subscribe()— the extension just never subscribed.How (architecture)
src/turnProgress.ts(new, pure) —reduceTurnProgress(state, AgentRuntimeEvent) → snapshot, the unit-tested core. Novscode,AgentRuntimeEventtype-only.runEditTurngainsonProgress+AbortSignal— subscribes/abort-wires; result path untouched; staysvscode-free.src/liveProgressUi.ts(new) — host relay (notification line + OutputChannel).editTurnseam widens to acceptopts?(back-compat — existing stubs ignore it).Invariants
INV-43 (liveTurn/turnProgress stay vscode-free) · INV-44 (purely additive — proposals unchanged) · INV-45 (no new network/webview surface) · INV-46 (pure reducer) · INV-47 (cancel reflects, proposes nothing).
Tests
237 unit (new
turnProgressreducer +runEditTurnprogress/cancel) + 2 new host-E2E (progress is additive; abort proposes nothing). Self-reviewed by a subagent; fixed a Medium (pre-aborted-signal no-op) + Low (throwing relay) it found.🤖 Generated with Claude Code