28860c9f42
fix(cli): wire initialModel/initialProvider through useSocket, add error handling
...
ci/woodpecker/push/ci Pipeline was successful
- Pass initialModel/initialProvider from CLI flags into useSocket hook
- Include provider/modelId in socket message emit (restores PR #144 functionality)
- Add provider/modelId optional fields to ChatMessagePayload type
- Add .catch() to floating promises in createConversation/deleteConversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-15 17:16:42 -05:00
9e8f9f4896
feat(cli): message search with highlighting (TUI-011)
2026-03-15 16:39:23 -05:00
b900e0625b
feat(cli): conversation sidebar with list/create/switch/delete (TUI-008)
2026-03-15 16:39:22 -05:00
836652b868
feat(cli): add scrollable message history with PgUp/PgDn (TUI-010)
...
- Create use-viewport hook tracking scroll offset, viewport size, auto-follow
- Update MessageList to slice visible messages and show scroll indicator
- Wire PgUp/PgDn keybindings in app.tsx
2026-03-15 16:39:22 -05:00
f0b31d9983
feat(gateway,cli,types): wire token usage, model info, and thinking levels
...
Gateway:
- Emit session:info on session creation with provider, model, thinking level
- Include SessionUsagePayload in agent:end with token stats, cost, context usage
- Handle set:thinking client event to cycle thinking levels
- Respond with updated session:info after thinking level change
Types (@mosaic/types):
- Add SessionUsagePayload (tokens, cost, context) to AgentEndPayload
- Add SessionInfoPayload (provider, model, thinking level, available levels)
- Add SetThinkingPayload and set:thinking to ClientToServerEvents
- Add session:info to ServerToClientEvents
CLI TUI:
- useSocket now tracks tokenUsage, modelName, providerName, thinkingLevel
- Updates from both session:info and agent:end usage payload
- Ctrl+T cycles thinking level via set:thinking socket event
- Footer shows thinking level next to model (e.g. 'claude-opus-4-6 • medium')
- Token stats populate with real ↑in ↓out Rcache Wcache $cost ctx%
2026-03-15 16:39:14 -05:00
e42d6eadff
feat(cli): match TUI footer to reference design
...
- Remove borders from input bar — clean '❯ message mosaic…' prompt
- Two-line footer without borders:
- Line 1: compact cwd (branch) | Gateway: Connected/Disconnected
- Line 2: token stats (^in v_out R_cache W_cache $cost ctx%) | (provider) model
- Extend TokenUsage with cacheRead, cacheWrite, cost, contextPercent, contextWindow
- Add providerName to socket hook return
- Reorder layout: top bar → messages → input → footer
2026-03-15 16:39:02 -05:00
9ae1bac614
feat(cli): TUI component architecture — status bars, message list, input bar
...
- Split monolithic app.tsx into composable components:
- TopBar: connection indicator (●/○), gateway URL, model name, conversation ID
- BottomBar: cwd, git branch, token usage
- MessageList: timestamped messages, tool call indicators, thinking display
- InputBar: context-aware prompt with streaming/disconnect states
- Extract socket logic into useSocket hook with typed events
- Extract git/cwd info into useGitInfo hook
- Quiet disconnect: single indicator instead of error flood
- Add @mosaic/types dependency for typed Socket.IO events
- Add PRD and task tracking docs
Tasks: TUI-001 through TUI-007 (Wave 1)
2026-03-15 16:38:58 -05:00