Commit Graph
30 Commits
Author SHA1 Message Date
Chris Scott 5cc1fbb9b5 Set XDG_CONFIG_HOME to enable workspace AGENTS.md consumption 2025-12-13 23:38:10 -05:00
Chris Scott e45ebd96a0 Add Python support with uv package manager in Docker container 2025-12-13 00:39:09 -05: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 af9f645f30 Add ZIP download feature for repositories
- Add archive service to create ZIP files excluding gitignored files
- Add download endpoint to backend repo routes
- Add download button to repo cards with loading state
- Update README with new ZIP download feature
2025-12-12 20:48:38 -05:00
Chris Scott 93a69fcaab Improve UI: show branch name on all screen sizes and increase back button padding 2025-12-12 19:35:59 -05:00
Chris Scott 0e1517f068 Refactor JSONC parsing to shared utility and fix code duplication 2025-12-12 15:38:10 -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 b739c5266f Switch MCP management to use OpenCode server API with version requirement >=1.0.137 2025-12-09 00:13:27 -05:00
Chris Scott 42b5eff728 Restart OpenCode server after OAuth callback with loading UI 2025-12-07 23:26:11 -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 e37059360a Replace URL token embedding with GIT_ASKPASS for git authentication 2025-12-05 07:51:33 -08:00
Chris Scott af0dcac7c8 Add GitHub token environment variable support and improve git operations 2025-11-30 21:05:30 -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 dfde798845 Fix migration to handle tables missing is_local and is_worktree columns 2025-11-28 10:36:58 -05:00
Chris Scott 83834e7ed7 Add local repository support and permission request handling 2025-11-28 10:26:03 -05:00
Chris Scott ed82b99236 Add git changes viewer with diff display
- Add backend git-operations service for git status and file diffs
- Add git/status and git/diff API routes to repos
- Add GitChangesPanel component to list changed files with status
- Add FileDiffView component with unified diff rendering
- Add GitChangesSheet as full-screen dialog wrapper
- Integrate View Changes option into BranchSwitcher dropdown
- Support both mobile (stacked) and desktop (split) layouts
2025-11-27 10:10:49 -05:00
Chris Scott 12b7ab54b2 Add file virtualization and patch editing for large files 2025-11-27 09:23:10 -05:00
Chris Scott 16767a2a77 Add dynamic path display to file browser with truncation support 2025-11-27 08:28:30 -05:00
Chris Scott fea3c214af Add MCP server management with auto-restart functionality 2025-11-26 23:43:19 -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 18be821fdb change backend port from 5001 to 5003 2025-11-25 10:59:17 -05:00
Chris Scott b7cf5a707a refactor: replace OpenCode server restarts with config patch API 2025-11-25 10:34:18 -05:00
Chris Scott 595c1e2da6 fix: auto-create default OpenCode config on startup and sync to disk on update 2025-11-25 10:30:40 -05:00
Chris Scott 4d7572a4fc fix: consolidate OpenCode config file path and sync on startup 2025-11-25 10:09:28 -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 0db354048d update database path from ./backend/data to ./data 2025-11-24 11:55:16 -05:00
Chris Scott bbf66c259b Initial release v0.2.5 2025-11-23 23:25:27 -05:00