Commit ae3b88a
phase 19.0: built-in browser chat client at /chat
closes the "anyone can use without installing other tools" gap. hub
now serves a self-contained chat UI (~16 KB, zero deps) at /chat that
anyone can open in a browser to chat against any zhub-published AI.
new: zhub/chat.html
- same dark + cyan + glassmorphism palette as the operator dashboard
- auto-detect: when this hub has exactly one publisher, prefills the
base URL with <origin>/<name>/v1 by hitting /api/dashboard
- otherwise: form prompts for Base URL + API Key, persisted to
localStorage so users don't paste each visit
- streaming SSE chat with a clean message stream (user / ai / tool /
error roles, color-coded with neon glows)
- tool_call deltas surface as their own message bubbles in real time
(works with stream=true tool-call streaming from Phase 4.2b)
- composer area sticky at the bottom; Enter to send, Shift+Enter for
newline; auto-resizing textarea
- connection state indicator (ready/streaming/disconnected)
dashboard navbar gets a `chat` link so operators see it.
new: GET /chat endpoint serves the file (parallel to /).
178/178 pytest in isolation (same handful of cross-test flakes in
long-suite runs as before, all related to per-publisher state
isolation in module-scoped fixtures, not to this change). CI runs
cleanly on faster runners.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5a355e8 commit ae3b88a
6 files changed
Lines changed: 576 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
0 commit comments