Commit Graph

33 Commits

Author SHA1 Message Date
Shantur Rathore
e12f39abc2 tweak: enlarge message empty state branding 2025-11-13 23:07:22 +00:00
Shantur Rathore
bde4501cfc chore: brand message stream empty state 2025-11-13 23:06:43 +00:00
Shantur Rathore
f42d0a285d Propagate session context usage percent 2025-11-13 11:17:26 +00:00
Shantur Rathore
89dbe43d87 Commit - use types from SDK 2025-11-11 21:06:37 +00:00
Shantur Rathore
5f53826c8d Fix tool id creation 2025-11-11 12:24:26 +00:00
Shantur Rathore
d277d50ed7 Fix shiki and diff caching 2025-11-10 21:54:01 +00:00
Shantur Rathore
910249ff25 Session info + Todo formatting 2025-11-10 20:57:29 +00:00
Shantur Rathore
c9ef192ef2 improve message autoscroll and metadata 2025-11-08 23:11:45 +00:00
Shantur Rathore
c6b3686f13 add toasts, session usage tracking, and copy controls 2025-11-08 22:04:50 +00:00
Shantur Rathore
81ab3a40ed add diff viewer prefs and task session shortcut 2025-11-08 12:53:51 +00:00
Shantur Rathore
4b2cb9d212 Improve session sidebar UX and tool rendering 2025-11-07 22:53:45 +00:00
Shantur Rathore
5483932196 Improve session defaults and onboarding UI 2025-11-07 21:22:46 +00:00
Shantur Rathore
27da588d22 Track tool part versions for SSE updates 2025-11-07 13:41:07 +00:00
Shantur Rathore
09f846b064 Tool call scrolling and updates 2025-11-04 22:14:04 +00:00
Shantur Rathore
5ccac400e4 Prevent streaming updates from re-rendering session UI 2025-11-03 20:07:17 +00:00
Shantur Rathore
fb85fcb3f3 Hide empty assistant messages until content arrives 2025-10-30 14:47:51 +00:00
Shantur Rathore
c3504266fa fix: persist session scroll state across tabs 2025-10-29 19:12:18 +00:00
Shantur Rathore
a522e9f45b feat: auto-scroll message stream on change detection 2025-10-29 16:07:05 +00:00
Shantur Rathore
1ce5b125a9 Expand dark theme coverage across client UI 2025-10-28 18:19:17 +00:00
Shantur Rathore
6597783e85 Stabilize message stream rendering caches 2025-10-28 13:48:56 +00:00
Shantur Rathore
79e4931b28 Precompute message display parts and pause scroll handling 2025-10-28 12:10:43 +00:00
Shantur Rathore
3a15ba7f76 Optimize streaming updates and clear optimistic parts 2025-10-28 11:19:19 +00:00
Shantur Rathore
7a91f4fd26 Track session metrics per session 2025-10-27 15:48:29 +00:00
Shantur Rathore
39e653e896 SessionInfo calculates only when messages are updated 2025-10-27 11:53:27 +00:00
Shantur Rathore
c4a8a54bd7 Add context window percentage and subscription model detection to session info 2025-10-25 18:41:15 +01:00
Shantur Rathore
c01a7e7315 Add session tokens/cost display to status bar like TUI
- Add utility functions to calculate and format session info from messagesInfo
- Display tokens and cost on left side of status bar
- Center Command Palette text in status bar
- Format matches TUI: '110K • /bin/sh.42'
- Updates in real-time as messages are processed
2025-10-24 23:55:12 +01:00
Shantur Rathore
be3acd6724 Implement toggle thinking blocks with localStorage persistence
- Add preferences store to manage user preferences in localStorage
- Toggle thinking blocks visibility via command palette (default: hidden)
- Dynamic command label shows current state (Show/Hide Thinking Blocks)
- Filter reasoning parts based on preference in message-stream
- Conditionally render reasoning parts in message-part component
- Support function labels in Command interface for dynamic text
2025-10-24 18:24:35 +01:00
Shantur Rathore
1362a5872a Add revert button to user messages
- Add revert icon (↶) button in message header for all user messages
- Clicking revert button reverts session to that specific message
- Restores the message text back to the prompt input
- Style revert button with hover effects and border highlight
- Revert action updates UI automatically via SSE session.updated event
2025-10-24 17:44:19 +01:00
Shantur Rathore
3edd852ee2 Implement compact, undo, and init commands
- Add compact command with proper API parameters (providerID, modelID)
- Implement undo command matching TUI behavior:
  - Find previous user message before revert point
  - Restore reverted message to prompt input
  - Filter messages client-side based on session.revert field
- Add init command with proper hex-encoded message ID generation
- Add session.revert field handling:
  - Parse revert field from API responses in fetchSessions and createSession
  - Update revert field via SSE session.updated events
  - Filter messages during render when revert point is set
- Add SSE event handlers for session.compacted and session.error
- Add force reload option to loadMessages for post-compact refresh
- Messages now filter instantly based on revert state without API reload
2025-10-24 17:41:55 +01:00
Shantur Rathore
7be4248e20 Enable command queueing and fix message duplication issues
- Remove sending() state blocking to allow queueing multiple messages
- Add optimistic message creation with temp IDs for immediate UI feedback
- Implement QUEUED badge display matching TUI behavior (accent color, bold)
- Compute queued state: user message ID > last assistant message ID
- Clear prompt input immediately before async send for better UX
- Fix duplicate messages by properly finding and replacing temp messages
- Fix duplicate parts by clearing optimistic parts when real message arrives
- Fix state mutation bugs in message.part.updated handler (immutable updates)
- Fix state mutation bugs in message.updated handler (immutable updates)

Matches TUI implementation for consistent user experience across clients.
2025-10-24 16:38:42 +01:00
Shantur Rathore
54569b166d Add command palette with 19 commands and improved keyboard navigation
Implement VSCode-style command palette (Cmd+Shift+P) with comprehensive command organization:
- 19 commands organized into 5 categories: Instance, Session, Agent & Model, Input & Focus, System
- Category-based grouping with proper visual hierarchy
- Keyboard shortcuts displayed for all applicable commands
- Search/filter by command name, description, keywords, or category

Add keyboard shortcuts:
- Cmd+Shift+A: Open agent selector
- Cmd+Shift+M: Open model selector (existing)
- Instance/Session navigation shortcuts (Cmd+[/], Cmd+Shift+[/])

Fix keyboard navigation:
- Model selector now highlights options with arrow keys using data-[highlighted] attribute
- Agent selector properly opens via keyboard shortcut
- Global keyboard handler skips Combobox/Select components to allow native navigation

Improve discoverability:
- Prominent centered Command Palette hint in connection status bar
- Keyboard shortcut hints next to agent and model selectors

Complete task 020-command-palette
2025-10-23 22:32:49 +01:00
Shantur Rathore
d7f619486e Implement comprehensive tool call rendering with state persistence
- Implement tool-specific rendering for all 14 tool types (read, edit, write, bash, webfetch, todowrite, task, etc.)
- Each tool shows contextually relevant information (file previews, diffs, command output, todo lists)
- Add metadata-driven content display using preview, diff, output, and todos from tool state
- Implement status-based rendering (pending, running, completed, error) with animations
- Create global state store for expandable items (tool calls and reasoning sections)
- Fix state persistence: expanded tool calls and reasoning sections remain expanded when new messages arrive
- Fix scroll position preservation during live message updates
- Fix reasoning toggle loop by replacing native details element with custom expandable
- Add comprehensive documentation in TOOL_CALL_IMPLEMENTATION.md
- Reduce font sizes for better readability in expanded tool content
- Add proper keying to For loops to prevent component recreation
- Match TUI patterns for tool names, actions, and content formatting
2025-10-23 01:18:25 +01:00
Shantur Rathore
fa77b4e82e Working messages display 2025-10-22 22:10:51 +01:00