From 2756730aeba633c3cc331500bcfb9a67d85dc892 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Tue, 2 Jun 2026 14:39:20 +0900 Subject: Add status bar beneath chat input with send/stop button and context display Restructure ChatInput into two stacked bars: - Top bar: auto-resizing textarea + fixed-width send/stop button that morphs in place (no layout shift) across idle/generating states. - Bottom bar: agent status icon, context-window fill bar, and compact token count + percent (inert bar when model max is unknown). Wire contextLimit prop from App.svelte into ChatInput, reusing the shared computeContextUsage helper so it agrees with the sidebar. --- .../frontend/src/lib/components/ChatInput.svelte | 145 ++++++++++++++++----- 1 file changed, 110 insertions(+), 35 deletions(-) (limited to 'packages/frontend/src/lib/components/ChatInput.svelte') diff --git a/packages/frontend/src/lib/components/ChatInput.svelte b/packages/frontend/src/lib/components/ChatInput.svelte index 0c99078..95712c7 100644 --- a/packages/frontend/src/lib/components/ChatInput.svelte +++ b/packages/frontend/src/lib/components/ChatInput.svelte @@ -1,6 +1,9 @@ -
- {#if agentStatus === "running"} +
+ +
+ + - {:else if agentStatus === "idle"} - - - - {:else if agentStatus === "error"} - - - - - - {/if} - - +
+ + +
+ + + {#if agentStatus === "running"} + + {:else if agentStatus === "error"} + + + + + + {:else} + + + + {/if} + + + + {#if usage.percent !== null} + + {:else} + + + {/if} + + + + {#if hasUsage} + {fmtCompact(usage.current)}{#if usage.max !== null} / {fmtCompact(usage.max)}{/if} + {#if usage.percent !== null} + · {usage.percent.toFixed(1)}% + {/if} + {:else} + — tokens + {/if} + +
-- cgit v1.2.3