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

43
src/types/provider.ts Normal file
View File

@@ -0,0 +1,43 @@
/**
* AI 提供商相关类型
* 基于原项目 src/modules/ai-providers.js
*/
export interface ModelAlias {
name: string;
alias?: string;
priority?: number;
testModel?: string;
}
export interface ApiKeyEntry {
apiKey: string;
proxyUrl?: string;
headers?: Record<string, string>;
}
export interface GeminiKeyConfig {
apiKey: string;
baseUrl?: string;
headers?: Record<string, string>;
excludedModels?: string[];
}
export interface ProviderKeyConfig {
apiKey: string;
baseUrl?: string;
proxyUrl?: string;
headers?: Record<string, string>;
models?: ModelAlias[];
}
export interface OpenAIProviderConfig {
name: string;
baseUrl: string;
apiKeyEntries: ApiKeyEntry[];
headers?: Record<string, string>;
models?: ModelAlias[];
priority?: number;
testModel?: string;
[key: string]: any;
}