refactor(web): delete dead code (R2) — 1736 lines removed
Tool-renderer registry (21 files, ~1.5k lines):
- src/lib/tool-renderers.ts — registry + getToolRenderer (exported, never
imported anywhere)
- src/lib/renderers/index.ts + 10 .ts registrars + 10 .svelte components
- main.ts: removed the requestAnimationFrame(() => import('./lib/renderers'))
that was the only thing keeping the dead subsystem alive
Dead components (never imported):
- ToolCallGroup, PlanProgress, GoalHeader, InlineApproval, SessionDigest
Dead store exports (written, never read):
- context.ts: pendingApprovals writable (+ Approval type import)
- events.ts: connectionState writable (+ its .set() calls)
Dead API surface:
- api.ts: SessionDigest interface + fetchSessionDigest (only caller was the
dead SessionDigest.svelte)
Dead npm deps:
- mode-watcher (0 imports; superseded by stores/theme.svelte.ts)
- @internationalized/date (0 imports)
Also: fix stale comments referencing deleted symbols, update plan R1/R2
status. Build clean (4683 modules, down from 4706; one Svelte 5 warning
gone — the dead HealthSummary.svelte was emitting state_referenced_locally).
This commit is contained in:
@@ -83,7 +83,7 @@ function applyEvent(ev: { type: string; correlation_id?: string | null; data?: u
|
||||
const data = (ev.data ?? {}) as any
|
||||
|
||||
// Task fields (status/goal/outcome) live on the session row — refetch the
|
||||
// (cheap) session list so GoalHeader picks up the change without a
|
||||
// (cheap) session list so the UI picks up the change without a
|
||||
// dedicated endpoint. Every event that can change agent_sessions.status
|
||||
// (goal.set → planning, propose_plan → executing, ask_operator →
|
||||
// awaiting_input, answerQuestion → executing, complete_task → done/failed)
|
||||
@@ -138,8 +138,7 @@ function applyEvent(ev: { type: string; correlation_id?: string | null; data?: u
|
||||
}
|
||||
break
|
||||
case 'knowledge.recorded':
|
||||
// No dedicated store yet — the outcome/knowledge card reads this task's
|
||||
// digest (fetchSessionDigest) on completion, which already lists it.
|
||||
// No dedicated store — knowledge cards refetch on completion signal.
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user