Commit Graph

24 Commits

Author SHA1 Message Date
Shantur Rathore
476834dab2 Hardcode dark theme 2025-10-30 09:55:18 +00:00
Shantur Rathore
41843de5e0 fix: route escape abort through busy stub 2025-10-30 00:21:10 +00:00
Shantur Rathore
e406c9f76d refactor: replace session tabs with sectioned list 2025-10-29 11:46:59 +00:00
Shantur Rathore
e84cab5527 fix: UI improvements with design tokens - theme switching, full width settings, visible buttons, and delete icons 2025-10-28 21:53:42 +00:00
Shantur Rathore
1ce5b125a9 Expand dark theme coverage across client UI 2025-10-28 18:19:17 +00:00
Shantur Rathore
2c46b7476b Broaden code fence detection and default to text 2025-10-28 16:48:50 +00:00
Shantur Rathore
d743ebda29 Improve markdown rendering and syntax highlighting 2025-10-28 16:42:23 +00:00
Shantur Rathore
d18e44f721 Cache markdown render output per message part 2025-10-28 14:41:09 +00:00
Shantur Rathore
0b26ffd97d Add environment variables configuration to OpenCode instances
- Add environment variables editor in advanced settings
- Store environment variables in global preferences
- Pass environment variables to OpenCode processes when spawning
- Display environment variables in instance information and server logs
- Fix system PATH binary handling for 'opencode' command
- Show detailed environment variable values in startup logs
- Save and restore last used binary across app restarts
- Add system PATH binary to recent binaries list when used

Features:
- Environment variables editor with add/remove functionality
- Persistent storage of environment variables across sessions
- Real-time display of active environment variables in logs
- Instance information shows configured environment variables
- Proper handling of system PATH vs custom binary paths
- Last used binary persistence and automatic restoration
2025-10-26 10:48:47 +00:00
Shantur Rathore
f63a4b3754 Add OpenCode binary selection with version detection
- Add binary selector component with dropdown and validation
- Support custom OpenCode binary paths and system PATH binary
- Async version checking for all binaries when selector opens
- Store recent binaries with timestamps and version info
- Enhanced instance creation to use selected binary
- Improved storage system for binary preferences
- Fixed validation to handle system PATH binaries properly
2025-10-26 10:26:32 +00:00
Shantur Rathore
f4a664bfe7 Migrate from IndexedDB to file-based storage with cross-instance sync 2025-10-25 20:21:52 +01:00
Shantur Rathore
0fc78fbfdd Fix Cmd+Shift+L shortcut conflict by removing old switch-to-logs 2025-10-24 23:31:13 +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
e58462b926 Fix revert/undo state synchronization and message cleanup
- Clear session.revert when server sends undefined (fixes inability to send messages after revert)
- Handle message.removed and message.part.removed SSE events to reload messages
- Ensures reverted messages are removed from UI in real-time without requiring app restart
2025-10-24 18:21:11 +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
e3bc947195 Implement double-escape session abort matching TUI behavior
- Add double-escape debounce pattern with 1-second timeout
- First escape shows warning, second escape aborts session
- Fix session busy check to handle undefined timeCompleted field
- Add abortSession API call to sessions store
- Show visual feedback in prompt input during debounce
- Remove Escape from filtered keys in prompt-input auto-focus
2025-10-24 16:09:32 +01:00
Shantur Rathore
b24c7a572f Remove agent cycling and enhance model selector display
- Remove Tab/Shift+Tab shortcuts for cycling agents
- Remove Next/Previous Agent commands from command palette
- Remove handleCycleAgent and handleCycleAgentReverse functions
- Remove Tab keyboard hint from agent selector UI
- Enhance model selector to show provider/modelId below model name
- Widen model selector button to accommodate additional text
2025-10-24 12:35:53 +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
40cb17d0eb Fix syntax highlighting by upgrading to Shiki v3 with all languages
- Upgrade shiki from ^1.0.0 to ^3.13.0
- Use shiki/bundle/full with all bundled languages (200+)
- Change getHighlighter to createHighlighter (v3 API)
- Fix CodeBlockInline to track reactive dependencies (theme, code, language)
- Add markdown code block detection in tool call outputs
- Render tool outputs with Markdown component when they contain code blocks
- Support syntax highlighting for bash, webfetch, and default tool outputs
2025-10-23 21:38:16 +01:00
Shantur Rathore
4c98a3df06 Add keyboard shortcuts system with reusable hint components
- Implement centralized keyboard registry with 20+ shortcuts
- Add instance navigation (Cmd+[1-9], Cmd+[/])
- Add session navigation (Cmd+Shift+[1-9], Cmd+Shift+[/])
- Add agent/model cycling (Tab, Cmd+Shift+M)
- Add input shortcuts (Cmd+P focus, Cmd+K clear, ↑↓ history)
- Add command palette (Cmd+Shift+P) with 8 MVP commands
- Implement message history per folder in IndexedDB (max 100)
- Create reusable Kbd and HintRow components
- Replace all keyboard hint rendering with consistent components
- Use text-based shortcuts (Cmd+Shift+M) for clarity
2025-10-23 20:18:45 +01:00
Shantur Rathore
3c5c4755b8 Add logs tab with real-time server output and consolidate syntax highlighting
- Implement dedicated Logs tab showing stdout/stderr from OpenCode server
- Add log level parsing (INFO, ERROR, WARN, DEBUG) with color coding
- Stream logs from main process to renderer via IPC events
- Persist scroll position and auto-scroll state per instance
- Synchronize instance IDs between renderer and main process
- Consolidate syntax highlighting to single shared highlighter instance
- Optimize markdown rendering with global highlighter initialization
- Fix code block copy button to always appear on right side
- Enable debug logging with --print-logs --log-level DEBUG flags
2025-10-23 11:14:35 +01:00
Shantur Rathore
b836086978 Add markdown rendering with syntax highlighting and copy buttons
- Implement markdown parser using marked with Shiki syntax highlighting
- Add CodeBlockInline component for tool call outputs with syntax highlighting
- Add Markdown component for assistant message text with code blocks
- Add ThemeProvider for light/dark mode support
- Add copy buttons to all code blocks (markdown and tool calls)
- Support 20+ languages: TypeScript, JavaScript, Python, Bash, JSON, HTML, CSS, C++, Java, C, C#, Rust, Go, PHP, Ruby, Swift, Kotlin, and more
- Auto-detect language from file extensions in tool call outputs
- Apply consistent styling for code blocks across the application
- Fix whitespace handling in markdown-rendered text
- Add language labels to all code blocks
2025-10-23 10:07:17 +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