///
import { Provider, Settings } from "./types";
import { AppType } from "./lib/tauri-api";
import type { UnlistenFn } from "@tauri-apps/api/event";
interface ImportResult {
success: boolean;
message?: string;
}
interface ConfigStatus {
exists: boolean;
path: string;
error?: string;
}
declare global {
interface Window {
api: {
getProviders: (app?: AppType) => Promise>;
getCurrentProvider: (app?: AppType) => Promise;
addProvider: (provider: Provider, app?: AppType) => Promise;
deleteProvider: (id: string, app?: AppType) => Promise;
updateProvider: (provider: Provider, app?: AppType) => Promise;
switchProvider: (providerId: string, app?: AppType) => Promise;
importCurrentConfigAsDefault: (app?: AppType) => Promise;
getClaudeCodeConfigPath: () => Promise;
getClaudeConfigStatus: () => Promise;
getConfigStatus: (app?: AppType) => Promise;
getConfigDir: (app?: AppType) => Promise;
selectConfigDirectory: (defaultPath?: string) => Promise;
openConfigFolder: (app?: AppType) => Promise;
openExternal: (url: string) => Promise;
updateTrayMenu: () => Promise;
onProviderSwitched: (
callback: (data: { appType: string; providerId: string }) => void,
) => Promise;
getSettings: () => Promise;
saveSettings: (settings: Settings) => Promise;
checkForUpdates: () => Promise;
isPortable: () => Promise;
getAppConfigPath: () => Promise;
openAppConfigFolder: () => Promise;
// Claude 插件配置能力
getClaudePluginStatus: () => Promise;
readClaudePluginConfig: () => Promise;
applyClaudePluginConfig: (options: {
official: boolean;
}) => Promise;
isClaudePluginApplied: () => Promise;
};
platform: {
isMac: boolean;
};
__TAURI__?: any;
}
}
export {};