initial commit

This commit is contained in:
farion1231
2025-08-04 22:16:26 +08:00
commit e0a9c1ab4c
20 changed files with 1127 additions and 0 deletions

33
src/shared/types.ts Normal file
View File

@@ -0,0 +1,33 @@
export interface Provider {
id: string
name: string
apiUrl: string
apiKey: string
model?: string
}
export interface ProviderStatus {
isOnline: boolean
responseTime: number
lastChecked: Date
error?: string
}
export interface AppConfig {
providers: Record<string, Provider>
current: string
}
declare global {
interface Window {
electronAPI: {
getProviders: () => Promise<Record<string, Provider>>
getCurrentProvider: () => Promise<string>
addProvider: (provider: Provider) => Promise<boolean>
deleteProvider: (id: string) => Promise<boolean>
checkStatus: (provider: Provider) => Promise<ProviderStatus>
switchProvider: (providerId: string) => Promise<boolean>
getClaudeCodeConfigPath: () => Promise<string>
}
}
}