feat(cli-settings): Implement CLI settings management and routes

- Added CLI settings file manager to handle endpoint configurations.
- Introduced API routes for creating, updating, deleting, and listing CLI settings.
- Enhanced session discovery for OpenCode with improved storage structure.
- Updated command building logic for OpenCode and Claude to support new settings.
- Added validation and sanitization for endpoint IDs and settings.
- Implemented functionality to toggle endpoint enabled status and retrieve executable settings paths.
This commit is contained in:
catlog22
2026-01-08 14:15:32 +08:00
parent 55fa170b4e
commit b86cdd6644
10 changed files with 1323 additions and 109 deletions

View File

@@ -65,8 +65,8 @@ export const DEFAULT_CONFIG: CliConfig = {
},
opencode: {
enabled: true,
primaryModel: 'anthropic/claude-sonnet-4-20250514',
secondaryModel: 'anthropic/claude-haiku'
primaryModel: '', // Empty = use opencode's default config
secondaryModel: ''
}
}
};