Files
CC-Switch/src/vite-env.d.ts
T
Jason c10ace7a84 - feat(codex): 引入 Codex 应用与供应商切换(管理 auth.json/config.toml,支持备份与恢复)
- feat(core): 多应用配置 v2(claude/codex)与 ProviderManager;支持 v1→v2 自动迁移
- feat(ui): 新增 Codex 页签与双编辑器表单;统一 window.api 支持 app 参数
- feat(tauri): 新增 get_config_status/open_config_folder/open_external 命令并适配 Codex
- fix(codex): 主配置缺失时不执行默认导入(对齐 Claude 行为)
- chore: 配置目录展示与重启提示等细节优化
2025-08-30 21:54:52 +08:00

42 lines
1.2 KiB
TypeScript

/// <reference types="vite/client" />
import { Provider } from "./types";
import { AppType } from "./lib/tauri-api";
interface ImportResult {
success: boolean;
message?: string;
}
interface ConfigStatus {
exists: boolean;
path: string;
error?: string;
}
declare global {
interface Window {
api: {
getProviders: (app?: AppType) => Promise<Record<string, Provider>>;
getCurrentProvider: (app?: AppType) => Promise<string>;
addProvider: (provider: Provider, app?: AppType) => Promise<boolean>;
deleteProvider: (id: string, app?: AppType) => Promise<boolean>;
updateProvider: (provider: Provider, app?: AppType) => Promise<boolean>;
switchProvider: (providerId: string, app?: AppType) => Promise<boolean>;
importCurrentConfigAsDefault: (app?: AppType) => Promise<ImportResult>;
getClaudeCodeConfigPath: () => Promise<string>;
getClaudeConfigStatus: () => Promise<ConfigStatus>;
getConfigStatus: (app?: AppType) => Promise<ConfigStatus>;
selectConfigFile: () => Promise<string | null>;
openConfigFolder: (app?: AppType) => Promise<void>;
openExternal: (url: string) => Promise<void>;
};
platform: {
isMac: boolean;
};
__TAURI__?: any;
}
}
export {};