feat(v2): add agent tree, status bar, notifications, settings dialog (Phase 5)
Agent tree visualization (SVG) with horizontal layout and bezier edges. Global status bar with pane counts, active agents pulse, token/cost totals. Toast notification system with auto-dismiss and agent dispatcher integration. Settings dialog with SQLite persistence for shell, cwd, and max panes. Keyboard shortcuts: Ctrl+W close pane, Ctrl+, open settings.
This commit is contained in:
parent
cd1271adf0
commit
be24d07c65
13 changed files with 809 additions and 2 deletions
|
|
@ -8,6 +8,7 @@
|
|||
type AgentSession,
|
||||
} from '../../stores/agents.svelte';
|
||||
import { isSidecarAlive, setSidecarAlive } from '../../agent-dispatcher';
|
||||
import AgentTree from './AgentTree.svelte';
|
||||
import type {
|
||||
AgentMessage,
|
||||
TextContent,
|
||||
|
|
@ -32,6 +33,8 @@
|
|||
let scrollContainer: HTMLDivElement | undefined = $state();
|
||||
let autoScroll = $state(true);
|
||||
let restarting = $state(false);
|
||||
let showTree = $state(false);
|
||||
let hasToolCalls = $derived(session?.messages.some(m => m.type === 'tool_call') ?? false);
|
||||
|
||||
onMount(async () => {
|
||||
if (initialPrompt) {
|
||||
|
|
@ -142,6 +145,16 @@
|
|||
</form>
|
||||
</div>
|
||||
{:else}
|
||||
{#if hasToolCalls}
|
||||
<div class="tree-toggle">
|
||||
<button class="tree-btn" onclick={() => showTree = !showTree}>
|
||||
{showTree ? '▼' : '▶'} Agent Tree
|
||||
</button>
|
||||
</div>
|
||||
{#if showTree && session}
|
||||
<AgentTree {session} />
|
||||
{/if}
|
||||
{/if}
|
||||
<div class="messages" bind:this={scrollContainer} onscroll={handleScroll}>
|
||||
{#each session.messages as msg (msg.id)}
|
||||
<div class="message msg-{msg.type}">
|
||||
|
|
@ -229,6 +242,24 @@
|
|||
font-size: 13px;
|
||||
}
|
||||
|
||||
.tree-toggle {
|
||||
padding: 4px 12px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tree-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--ctp-mauve);
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
font-family: var(--font-mono);
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.tree-btn:hover { color: var(--text-primary); }
|
||||
|
||||
.prompt-area {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue