feat: initialize new React application structure with TypeScript, ESLint, and Prettier configurations, while removing legacy files and adding new components and pages for enhanced functionality

This commit is contained in:
Supra4E8C
2025-12-07 11:32:31 +08:00
parent 8e4132200d
commit 450964fb1a
144 changed files with 14223 additions and 21647 deletions

50
src/types/config.ts Normal file
View File

@@ -0,0 +1,50 @@
/**
* 配置相关类型定义
* 与基线 /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<string, string[]>;
raw?: Record<string, any>;
}
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;
}