/** * 配置相关类型定义 * 与基线 /config 返回结构保持一致(内部使用驼峰形式) */ import type { GeminiKeyConfig, ProviderKeyConfig, OpenAIProviderConfig } from './provider'; export interface QuotaExceededConfig { switchProject?: boolean; switchPreviewModel?: boolean; } export interface Config { debug?: boolean; proxyUrl?: string; requestRetry?: number; quotaExceeded?: QuotaExceededConfig; usageStatisticsEnabled?: boolean; requestLog?: boolean; loggingToFile?: boolean; wsAuth?: boolean; apiKeys?: string[]; geminiApiKeys?: GeminiKeyConfig[]; codexApiKeys?: ProviderKeyConfig[]; claudeApiKeys?: ProviderKeyConfig[]; openaiCompatibility?: OpenAIProviderConfig[]; oauthExcludedModels?: Record; raw?: Record; } export type RawConfigSection = | 'debug' | 'proxy-url' | 'request-retry' | 'quota-exceeded' | 'usage-statistics-enabled' | 'request-log' | 'logging-to-file' | 'ws-auth' | 'api-keys' | 'gemini-api-key' | 'codex-api-key' | 'claude-api-key' | 'openai-compatibility' | 'oauth-excluded-models'; export interface ConfigCache { data: Config; timestamp: number; }