mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
12fa80e002
- 删除 Electron 主进程代码 (src/main/) - 删除构建产物文件夹 (build/, dist/, release/) - 清理 package.json 中的 Electron 依赖和脚本 - 删除 TypeScript 配置中的 Electron 相关文件 - 优化前端代码结构至 Tauri 标准结构 (src/renderer → src/) - 删除移动端图标和不必要文件 - 更新文档说明技术栈变更为 Tauri
39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
/// <reference types="vite/client" />
|
|
|
|
import { Provider } from './shared/types';
|
|
|
|
interface ImportResult {
|
|
success: boolean;
|
|
message?: string;
|
|
}
|
|
|
|
interface ConfigStatus {
|
|
exists: boolean;
|
|
path: string;
|
|
error?: 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<ImportResult>;
|
|
getClaudeCodeConfigPath: () => Promise<string>;
|
|
getClaudeConfigStatus: () => Promise<ConfigStatus>;
|
|
selectConfigFile: () => Promise<string | null>;
|
|
openConfigFolder: () => Promise<void>;
|
|
openExternal: (url: string) => Promise<void>;
|
|
};
|
|
platform: {
|
|
isMac: boolean;
|
|
};
|
|
__TAURI__?: any;
|
|
}
|
|
}
|
|
|
|
export {}; |