refactor: 清理 Electron 遗留代码并优化项目结构
- 删除 Electron 主进程代码 (src/main/) - 删除构建产物文件夹 (build/, dist/, release/) - 清理 package.json 中的 Electron 依赖和脚本 - 删除 TypeScript 配置中的 Electron 相关文件 - 优化前端代码结构至 Tauri 标准结构 (src/renderer → src/) - 删除移动端图标和不必要文件 - 更新文档说明技术栈变更为 Tauri
This commit is contained in:
39
src/vite-env.d.ts
vendored
Normal file
39
src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
/// <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 {};
|
||||
Reference in New Issue
Block a user