summaryrefslogtreecommitdiffhomepage
path: root/src/app/App.svelte
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-12 01:10:56 +0900
committerAdam Malczewski <[email protected]>2026-06-12 01:10:56 +0900
commit0e71903cc1419d20fbd593fd7330defdc4628af2 (patch)
treec669251424f49f6d8e5b3ec17e03f486d46740a1 /src/app/App.svelte
parent6bd7b39f6f53dd8f3743347a1cb72c2f74424dd8 (diff)
downloaddispatch-web-0e71903cc1419d20fbd593fd7330defdc4628af2.tar.gz
dispatch-web-0e71903cc1419d20fbd593fd7330defdc4628af2.zip
feat(chat): old-Dispatch composer layout — textarea + send + status bar
Restore the ergonomic composer from old Dispatch: an auto-resizing textarea (1→7 lines) with a fixed-width Send button beside it, and a status bar BELOW holding a status icon · context-window fill bar (escalating success/warning/ error color) · compact token count (current / limit · pct%). The bar reuses the latest turn's contextSize as current usage and HARDCODES a 1,000,000-token window limit as a placeholder (real per-model limit is the next backend ask). Absorbs the standalone ContextSizeBadge (removed). Pure helpers computeContextUsage + formatCompactTokens added to core/metrics (tested). 540 tests green.
Diffstat (limited to 'src/app/App.svelte')
-rw-r--r--src/app/App.svelte8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/app/App.svelte b/src/app/App.svelte
index 32db54f..dbb346a 100644
--- a/src/app/App.svelte
+++ b/src/app/App.svelte
@@ -10,7 +10,6 @@
ChatView,
Composer,
manifest as chatManifest,
- ContextSizeBadge,
ModelSelector,
} from "../features/chat";
import { manifest as conversationCacheManifest } from "../features/conversation-cache";
@@ -217,8 +216,11 @@
<ScrollToBottom show={smartScroll.showButton} onResume={() => smartScroll.resume()} />
</div>
- <ContextSizeBadge contextSize={store.activeChat.currentContextSize} />
- <Composer onSend={handleSend} />
+ <Composer
+ onSend={handleSend}
+ contextSize={store.activeChat.currentContextSize}
+ status={store.activeChat.error ? "error" : "idle"}
+ />
</div>
<!-- Full-height right sidebar. On wide screens (`lg:relative`) it is in-flow, so