summaryrefslogtreecommitdiffhomepage
path: root/backend-handoff.md
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 /backend-handoff.md
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 'backend-handoff.md')
-rw-r--r--backend-handoff.md11
1 files changed, 6 insertions, 5 deletions
diff --git a/backend-handoff.md b/backend-handoff.md
index e9b128a..847282b 100644
--- a/backend-handoff.md
+++ b/backend-handoff.md
@@ -111,11 +111,12 @@ harden `/chat` to treat blank as "not provided" if we ever want it — not neede
## 3. Likely NEXT backend asks (heads-up, not yet requested)
- **Model max context-window LIMIT** (the denominator for context size) — the context-size handoff
- flagged this as the separate, later field. The FE now shows current size alone (e.g. "34,102 tokens
- in context"); once a per-model/per-turn `contextWindow` (max token capacity) ships, the FE can render
- `contextSize / limit` (e.g. "34,102 / 200,000") + a usage bar. GLOSSARY term reserved: "context window"
- = the limit (distinct from "context size" = current usage). **Likely the next ask** — raise when the
- backend can source the model's advertised window.
+ flagged this as the separate, later field. **The FE already renders `contextSize / limit · pct%` + a
+ fill bar in the composer status bar, but the limit is currently HARDCODED to `1,000,000` as a
+ placeholder** (`MAX_CONTEXT` in `features/chat/ui/Composer.svelte`; GLOSSARY "context window" notes it).
+ When a per-model/per-turn `contextWindow` (max token capacity) ships, wire the real value through (drop
+ the hardcode) so the bar/percent are accurate. **Likely the next ask** — raise when the backend can
+ source the model's advertised window.
- `GET /conversations` — conversation list / sidebar (history explorer / switcher); could also expose a
per-conversation "last model" so a reopened tab seeds its model from the server instead of localStorage.
- `POST /conversations/:id/cancel` — "stop generating".