feat: add Accordion component for UI and Zustand store for coordinator management

- Implemented Accordion component using Radix UI for collapsible sections.
- Created Zustand store to manage coordinator execution state, command chains, logs, and interactive questions.
- Added validation tests for CLI settings type definitions, ensuring type safety and correct behavior of helper functions.
This commit is contained in:
catlog22
2026-02-03 10:02:40 +08:00
parent bcb4af3ba0
commit 5483a72e9f
82 changed files with 6156 additions and 7605 deletions

View File

@@ -860,7 +860,7 @@ export function removeClaudeApiEndpoint(
*/
export function addClaudeCustomEndpoint(
projectDir: string,
endpoint: { id: string; name: string; enabled: boolean; tags?: string[] }
endpoint: { id: string; name: string; enabled: boolean; tags?: string[]; availableModels?: string[]; settingsFile?: string }
): ClaudeCliToolsConfig {
const config = loadClaudeCliTools(projectDir);
@@ -869,7 +869,9 @@ export function addClaudeCustomEndpoint(
config.tools[endpoint.name] = {
enabled: endpoint.enabled,
tags: endpoint.tags.filter(t => t !== 'cli-wrapper'),
type: 'cli-wrapper'
type: 'cli-wrapper',
...(endpoint.availableModels && { availableModels: endpoint.availableModels }),
...(endpoint.settingsFile && { settingsFile: endpoint.settingsFile })
};
} else {
// API endpoint tool
@@ -877,7 +879,9 @@ export function addClaudeCustomEndpoint(
enabled: endpoint.enabled,
tags: [],
type: 'api-endpoint',
id: endpoint.id
id: endpoint.id,
...(endpoint.availableModels && { availableModels: endpoint.availableModels }),
...(endpoint.settingsFile && { settingsFile: endpoint.settingsFile })
};
}