Commit Graph
55 Commits
Author SHA1 Message Date
Chris Scott 17a9556c2a Add message editing state management and UI improvements 2025-12-21 13:18:39 -05:00
Chris ScottandChris Scott 0cbfe2e358 Fix pnpm resources (#29)
* Add message undo/refresh features and stop audio floating button

* Exclude workspace directory from pnpm workspace detection

---------

Co-authored-by: Chris Scott <chris@cstech.dev>
2025-12-21 09:46:38 -05:00
Chris Scott fb430359ce Add todo tool rendering components for task management 2025-12-21 08:51:59 -05:00
Chris Scott 44240f0aab Fix TTS sanitization and message handling bugs
- Add duplicate config validation to backend
- Fix TTS button comparison using original text
- Track original vs sanitized text in TTS context
- Update toast import in message hooks
- Add type safety for error handling
2025-12-18 22:44:07 -05:00
OpenCode Agent 6c4daaeae7 Add message undo/refresh functionality with editable user prompts
- Add revertMessage and unrevertSession methods to OpenCode API client
- Create useRemoveMessage and useRefreshMessage hooks for message operations
- Add MessageActionButtons component with X (remove) and refresh buttons
- Add EditableUserMessage component for editing prompts before resend
- Update MessageThread to integrate action buttons and editable messages
- Update AGENTS.md with improved guidelines and pnpm preference
2025-12-16 18:53:31 +00:00
Chris Scott b27d4a9cbb Add Mermaid diagram support to frontend message display 2025-12-16 00:06:06 -05:00
Chris Scott 67cb729ca7 Merge main into feature/TTS and resolve conflicts 2025-12-15 14:50:04 -05:00
Chris Scott f052b9cd5f Show session status indicator on mobile during streaming 2025-12-15 08:39:59 -05:00
Chris Scott 2c38f7f169 Fix branch switching UI updates and simplify model display
- Use setQueryData for immediate branch switch UI updates
- Replace model selector with SessionStatusIndicator during active streams
- Remove async model name fetching in favor of existing modelString
2025-12-14 18:33:43 -05:00
OpenCode 722c62f61e Add break-all to tool output for better mobile wrapping 2025-12-14 21:11:21 +00:00
OpenCode 873321b088 Fix tool call status stuck on running and improve mobile code block word-wrap 2025-12-14 20:30:07 +00:00
Chris Scott e45ebd96a0 Add Python support with uv package manager in Docker container 2025-12-13 00:39:09 -05:00
Chris Scott 2c9782aa53 Update ToolCallPart component styling 2025-12-12 19:36:25 -05:00
Chris Scott e4dd871408 Improve prompt input styling with visible focus state and consistent button heights 2025-12-09 23:36:30 -05:00
Chris Scott 517747c828 Mobile: send prompt on Enter and hide keyboard 2025-12-09 23:32:25 -05:00
Chris Scott e37bbf4ca4 Improve scroll behavior and input styling 2025-12-09 23:24:15 -05:00
Chris Scott 42f604c54f Replace stop button text with square icon 2025-12-09 18:39:39 -05:00
OpenCode Assistant 42149c4759 Fix mobile input UI issues
- Fix down arrow disappearing at bottom and model visibility
- Only hide secondary buttons on mobile during active streaming, not when scroll button shows
- Fix stop button to only show during actual session processing (busy/retry states)
- Integrate session status with streaming state for better stop button control
2025-12-08 13:52:40 +00:00
OpenCode Assistant 9608d1ce19 Fix mobile layout button overflow in PromptInput
Hide model selector and help dropdown on mobile when processing
or when scroll-to-bottom button is visible to prevent button
overflow on narrow screens.
2025-12-08 05:15:33 +00:00
Chris Scott c1aa8ba101 Fix critical linting errors and React hooks violations 2025-12-07 23:51:17 -05:00
Chris Scott f48acfa06b Add retry handling components and session status management 2025-12-07 23:47:54 -05:00
Chris Scott 7fdf776b50 Add message queuing and retry handling with status indicators 2025-12-07 23:47:23 -05:00
Chris Scott bc99c96021 Add OAuth provider authentication support (#14)
* feat: Implement OAuth support for provider authentication

- Add OAuth routes and API endpoints for authorize/callback flows
- Create OAuthAuthorizeDialog and OAuthCallbackDialog components
- Extend ProviderSettings to support both OAuth and API key auth
- Add OAuth credential support to auth service
- Update shared schemas with OAuth request/response types
- Support both 'auto' and 'code' OAuth flows
- Maintain backward compatibility with existing API key authentication

Backend:
- backend/src/routes/oauth.ts (new)
- backend/src/services/auth.ts (extended)
- backend/src/index.ts (route registration)

Frontend:
- frontend/src/api/oauth.ts (new)
- frontend/src/components/settings/OAuthAuthorizeDialog.tsx (new)
- frontend/src/components/settings/OAuthCallbackDialog.tsx (new)
- frontend/src/components/settings/ProviderSettings.tsx (enhanced)

Shared:
- shared/src/schemas/auth.ts (OAuth schemas)

* feat: Complete OAuth implementation with comprehensive features

- Add comprehensive error handling for OAuth failures with specific error messages
- Implement OAuth token status checking and expiration monitoring
- Add token refresh preparation with 5-minute expiration buffer
- Enhance OAuth API client with detailed error reporting
- Update OAuth routes to include database parameter and token status endpoint
- Add complete OAuth documentation to README with setup guide
- Improve user experience with clear error messages and troubleshooting steps
- Support both auto and code OAuth flows for different providers
- Maintain backward compatibility with existing API key authentication

Error Handling:
- Specific error messages for invalid codes, expiration, access denied
- Graceful fallback for server errors and network issues
- User-friendly error display in OAuth dialogs

Token Management:
- Token status endpoint for checking credential validity
- Expiration monitoring with automatic refresh preparation
- Secure storage of OAuth credentials alongside API keys

Documentation:
- Complete OAuth setup guide in README
- Comparison table for OAuth vs API keys
- Troubleshooting section for common OAuth issues

* fix: Resolve OAuth button opening API key dialog instead

- Add isOAuthMode state to track authentication mode
- Update API key dialog to only open when not in OAuth mode
- Modify OAuth and API key button handlers to set proper mode
- Add proper cleanup handlers to reset OAuth mode on close
- Ensure dialog state management prevents conflicting dialogs

This fixes the issue where clicking 'Add OAuth' would incorrectly
open the API key dialog instead of the OAuth authorization dialog.

* refactor: Address audit findings for OAuth implementation

Critical fixes:
- Remove unused db parameter from createOAuthRoutes()
- Add query invalidation in handleOAuthSuccess to update UI after OAuth
- Remove unused setOAuth and getOAuthWithRefreshCheck methods
- Fix file permission in delete method (add mode: 0o600)

DRY improvements:
- Extract duplicated error handling to shared oauthErrors.ts utility
- Add OAuthMethod constants to replace magic numbers 0/1
- Use centralized OPENCODE_SERVER_URL constant via ENV config
- Remove unused ProviderAuthMethodsResponseSchema import

Code quality:
- Add documentation comment noting types should match shared schemas
- Consolidate error mapping logic into single mapOAuthError function
- Improve code maintainability and reduce duplication

Files changed:
- backend/src/routes/oauth.ts
- backend/src/services/auth.ts
- backend/src/index.ts
- frontend/src/lib/oauthErrors.ts (new)
- frontend/src/api/oauth.ts
- frontend/src/components/settings/OAuthAuthorizeDialog.tsx
- frontend/src/components/settings/OAuthCallbackDialog.tsx
- frontend/src/components/settings/ProviderSettings.tsx

* Store model selection client-side with recent models display

* Limit provider settings to OAuth-capable providers only

* Remove unused code and consolidate model initialization into useModelSelection hook
2025-12-07 23:01:05 -05:00
Chris Scott dc7964021d Add @ mention support for agents and files, extract CopyButton component 2025-12-06 11:21:06 -08:00
Chris Scott 3e31dbcdf8 Fix parent/child session navigation for task tool calls 2025-12-06 11:15:09 -08:00
Chris Scott e1b8fbce5e Add /details and /export slash commands 2025-12-05 18:22:54 -08:00
Chris Scott fc658627d9 Align command suggestions with file suggestions and support command arguments 2025-12-05 17:57:32 -08:00
Chris Scott f12654ce66 Fix session model detection to use actual session model instead of default preference 2025-12-05 16:11:48 -08:00
Chris Scott 73db8c491d Make file suggestions dropdown height responsive 2025-12-05 07:31:33 -08:00
Chris Scott 8665a4d0bb Fix command and file suggestions rendering position on mobile and desktop 2025-11-30 23:17:56 -05:00
Chris Scott deacb9f865 Add abort session fallback with retry mechanism
- Immediately re-enable input when user clicks Stop
- Retry abort API call every 3 seconds in background (max 10 retries)
- Force-complete messages locally so UI is not blocked
- Stop retrying when server confirms abort via SSE
2025-11-30 22:38:48 -05:00
Chris Scott 025b2990ed Add MessageSkeleton component and fix loading states in SessionDetail
- Create MessageSkeleton component for better loading UX
- Update SessionDetail to use skeleton loading instead of spinner
- Fix type conflicts by removing duplicate exports from schemas
- Improve loading state handling with proper conditional rendering
2025-11-30 16:06:41 -05:00
Chris Scott 8c0689eac8 Update UI components and refactor message display 2025-11-29 20:23:45 -05:00
Chris Scott 1b9bb87858 Fix auto-scroll using wheel/touch events and reduce mobile text spacing 2025-11-29 14:36:38 -05:00
Chris Scott 2d7de3496f Consolidate all scroll logic into useAutoScroll hook 2025-11-29 12:13:38 -05:00
Chris Scott 494d2907fa Move useAutoScroll hook to SessionDetail and pass scroll functions to children 2025-11-29 12:07:23 -05:00
Chris Scott 2a74d6d7f5 Extract scroll logic into reusable useAutoScroll hook 2025-11-29 12:00:46 -05:00
Chris Scott 652b08d363 Auto-scroll during streaming after user sends a message 2025-11-29 11:58:47 -05:00
Chris Scott 8317eb9e98 Simplify scroll behavior to only auto-scroll on initial session load 2025-11-29 10:11:52 -05:00
Chris Scott ae929a7c96 Fix intermittent mobile scroll lock and suppress expected git errors on empty repos 2025-11-29 00:02:10 -05:00
Chris Scott f90683071f Fix mobile scroll on session reload and git errors on empty repos 2025-11-28 22:33:51 -05:00
Chris Scott fb91b4d3a3 Add TTS support with OpenAI-compatible endpoint configuration
- Add TTS settings schema and configuration UI with validation
- Create backend TTS proxy with 24hr file-based caching
- Add frontend useTTS hook with Cache API caching
- Add TTS playback button on assistant messages (step-finish)
- Include test button to verify TTS configuration
2025-11-28 19:52:35 -05:00
Chris Scott 283348b64f fix mobile styles 2025-11-28 17:42:58 -05:00
Chris Scott ca8037e192 Remove extra padding from prompt input on mobile 2025-11-28 17:29:21 -05:00
Chris Scott e163b64dde Fix iOS PWA layout issues and improve mobile header 2025-11-28 17:24:14 -05:00
Chris Scott 64e49a8a52 Improve chat UI with scroll management and bash command handling 2025-11-28 17:07:51 -05:00
Chris Scott 9a2ebc9652 Fix mobile chat layout overflow and sticky prompt input 2025-11-27 22:00:36 -05:00
Chris Scott 4cac704207 Optimize file browser performance with memoization and improve virtualized text rendering 2025-11-27 14:19:33 -05:00
Chris Scott 6c88f23b5f Fix iOS keyboard background and add PWA standalone detection 2025-11-27 11:24:47 -05:00
Chris Scott 44c42990cd redesign prompt input with unified layout and floating container 2025-11-26 23:59:43 -05:00