18 Commits
Author SHA1 Message Date
Chris Scott 4fd658fc7d Add diff expansion controls with ContentDiffViewer and CodePreview components 2025-12-26 18:07:33 -05:00
Chris Scott af39267aae Add TTS settings configuration and context management 2025-12-21 19:52:54 -05:00
Chris Scott 82d3a109ac Import existing OpenCode config on initialization and fix schema types 2025-12-20 10:11:30 -05:00
Chris Scott 5c0ba50e02 Fix browser runtime error by excluding Node.js env module from shared package exports 2025-12-15 15:04:53 -05:00
Chris Scott c7de65290a Add GitHub token validation and improve TTS configuration
- Add git token validation endpoint and UI validation
- Improve TTS endpoint normalization and discovery
- Move shared types to workspace package
- Add better error handling for TTS API calls
- Support composite voices for Kokoro-style TTS
- Auto-fetch TTS models and voices on config change
2025-12-15 14:43:03 -05:00
OpenCode 406ff8fd4a Add TTS model and voice discovery with caching 2025-12-15 17:43:05 +00:00
Chris Scott 433c2da50d Add global AGENTS.md editor and expose dev server ports 5100-5103 2025-12-12 23:38:14 -05:00
Chris Scott 4eec4e5c27 Add comprehensive JSONC support for opencode.jsonc files
- Store raw JSONC content in database, parse on-the-fly for validation
- Return rawContent field in API response for editing with comments preserved
- Update frontend to use rawContent for config editing
- Accept string or object content in create/update requests
- Download configs as .jsonc when they contain comments
- Add strip-json-comments dependency for JSONC parsing
- Add .jsonc MIME type support in backend file service

This preserves comments in opencode.jsonc files when editing through the UI
2025-12-12 15:29:53 -05:00
Chris Scott 8d0d961e50 Rename project from opencode-webui to opencode-manager
- Update package names from opencode-webui to opencode-manager
- Update all backend import statements to use @opencode-manager/shared
- Update Docker configuration and container name
- Update README.md with new repository URLs and project title
- Update frontend assets and titles
- Update version to 0.4.0
- Update docker entrypoint script comments

This change maintains all functionality while better reflecting the
project's purpose as a comprehensive management interface for OpenCode.
2025-12-12 13:58:08 -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 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 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 83834e7ed7 Add local repository support and permission request handling 2025-11-28 10:26:03 -05:00
Chris Scott 12b7ab54b2 Add file virtualization and patch editing for large files 2025-11-27 09:23:10 -05:00
Chris Scott a4b6222577 Use relative API URLs by default for external access 2025-11-25 14:25:10 -05:00
Chris Scott 349c130311 Fix Docker build: use pnpm workspaces and route frontend API calls through backend proxy 2025-11-25 14:17:17 -05:00
Chris Scott 8a56bc208d refactor: consolidate environment config and API handling
- Update database paths and port configuration
- Remove backend config.ts and sessions route
- Add mobile file preview and files API
- Clean up shared constants and provider hooks
2025-11-25 09:39:56 -05:00
Chris Scott bbf66c259b Initial release v0.2.5 2025-11-23 23:25:27 -05:00