refactor: 清理 Electron 遗留代码并优化项目结构

- 删除 Electron 主进程代码 (src/main/)
- 删除构建产物文件夹 (build/, dist/, release/)
- 清理 package.json 中的 Electron 依赖和脚本
- 删除 TypeScript 配置中的 Electron 相关文件
- 优化前端代码结构至 Tauri 标准结构 (src/renderer → src/)
- 删除移动端图标和不必要文件
- 更新文档说明技术栈变更为 Tauri
This commit is contained in:
farion1231
2025-08-23 21:13:25 +08:00
parent 29581b85d9
commit 12fa80e002
63 changed files with 16 additions and 922 deletions

29
src/types.ts Normal file
View File

@@ -0,0 +1,29 @@
export interface Provider {
id: string
name: string
settingsConfig: Record<string, any> // 完整的Claude Code settings.json配置
websiteUrl?: 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>
updateProvider: (provider: Provider) => Promise<boolean>
switchProvider: (providerId: string) => Promise<boolean>
importCurrentConfigAsDefault: () => Promise<{ success: boolean; providerId?: string }>
getClaudeCodeConfigPath: () => Promise<string>
selectConfigFile: () => Promise<string | null>
openConfigFolder: () => Promise<boolean>
openExternal: (url: string) => Promise<boolean>
}
}
}