feat: add API settings page for managing providers, endpoints, cache, model pools, and CLI settings

feat: implement semantic install dialog for CodexLens with GPU mode selection
feat: add radio group component for GPU mode selection
feat: update navigation and localization for API settings and semantic install
This commit is contained in:
catlog22
2026-02-02 11:16:19 +08:00
parent e4b627bc76
commit a54246a46f
10 changed files with 2648 additions and 14 deletions

View File

@@ -3822,3 +3822,72 @@ export async function toggleCliSettingsEnabled(endpointId: string, enabled: bool
export async function getCliSettingsPath(endpointId: string): Promise<{ endpointId: string; filePath: string; enabled: boolean }> {
return fetchApi(`/api/cli/settings/${encodeURIComponent(endpointId)}/path`);
}
// ========== Orchestrator Execution Monitoring API ==========
/**
* Execution state response from orchestrator
*/
export interface ExecutionStateResponse {
execId: string;
flowId: string;
status: 'pending' | 'running' | 'paused' | 'completed' | 'failed';
currentNodeId?: string;
startedAt: string;
completedAt?: string;
elapsedMs: number;
}
/**
* Execution log entry
*/
export interface ExecutionLogEntry {
timestamp: string;
level: 'info' | 'warn' | 'error' | 'debug';
nodeId?: string;
message: string;
}
/**
* Execution logs response
*/
export interface ExecutionLogsResponse {
execId: string;
logs: ExecutionLogEntry[];
total: number;
limit: number;
offset: number;
hasMore: boolean;
}
/**
* Fetch execution state by execId
* @param execId - Execution ID
*/
export async function fetchExecutionState(execId: string): Promise<{ success: boolean; data: ExecutionStateResponse }> {
return fetchApi(`/api/orchestrator/executions/${encodeURIComponent(execId)}`);
}
/**
* Fetch execution logs with pagination and filtering
* @param execId - Execution ID
* @param options - Query options
*/
export async function fetchExecutionLogs(
execId: string,
options?: {
limit?: number;
offset?: number;
level?: 'info' | 'warn' | 'error' | 'debug';
nodeId?: string;
}
): Promise<{ success: boolean; data: ExecutionLogsResponse }> {
const params = new URLSearchParams();
if (options?.limit) params.append('limit', String(options.limit));
if (options?.offset) params.append('offset', String(options.offset));
if (options?.level) params.append('level', options.level);
if (options?.nodeId) params.append('nodeId', options.nodeId);
const queryString = params.toString();
return fetchApi(`/api/orchestrator/executions/${encodeURIComponent(execId)}/logs${queryString ? `?${queryString}` : ''}`);
}