feat: add agent lineage visualization with SVG tree rendering

Add a dedicated /lineage route with custom SVG-based tree visualization
of the agent spawn chain. Nodes are colored by agent type (orchestrator,
researcher, coder, sysadmin, assistant) and display agent ID, type, and
spawn depth. Clicking a node opens a detail panel. Uses sample data
since the API does not yet expose lineage information.

Closes #15

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shahondin1624
2026-03-12 12:19:49 +01:00
parent 5624175ddd
commit 209e38d8a6
8 changed files with 692 additions and 0 deletions

View File

@@ -29,6 +29,7 @@
create(SessionConfigSchema, { overrideLevel: OverrideLevel.NONE })
);
let showConfig = $state(false);
const lineageHref = resolveRoute('/lineage');
const isNonDefaultConfig = $derived(
sessionConfig.overrideLevel !== OverrideLevel.NONE ||
@@ -136,6 +137,15 @@
<div class="flex flex-1 flex-col">
<header class="flex items-center justify-between border-b border-gray-200 bg-white px-4 py-3">
<h1 class="text-lg font-semibold text-gray-900">Chat</h1>
<div class="flex items-center gap-2">
<!-- eslint-disable svelte/no-navigation-without-resolve -- resolveRoute is resolve; plugin does not recognize the alias -->
<a
href={lineageHref}
class="rounded-lg px-2.5 py-1.5 text-sm text-gray-600 hover:bg-gray-100 hover:text-gray-900"
>
Lineage
</a>
<!-- eslint-enable svelte/no-navigation-without-resolve -->
<button
type="button"
onclick={() => (showConfig = !showConfig)}
@@ -147,6 +157,7 @@
{/if}
Config
</button>
</div>
</header>
<MessageList {messages} />