feat(provider): use live config for edit and backfill SSOT after switch
- Edit modal (Claude+Codex): when editing the current provider, initialize form from live files (Claude: ~/.claude/settings.json; Codex: ~/.codex/auth.json + ~/.codex/config.toml) instead of SSOT. - Switch (Claude): after writing live settings.json for the target provider, read it back and update the provider’s SSOT to match live. - Switch (Codex): keep MCP sync to config.toml, then read back TOML and update the target provider’s SSOT (preserves mcp.servers/mcp_servers schema). - Add Tauri command read_live_provider_settings for both apps, register handler, and expose window.api.getLiveProviderSettings. - Types updated accordingly; cargo check and pnpm typecheck pass.
This commit is contained in:
4
src/vite-env.d.ts
vendored
4
src/vite-env.d.ts
vendored
@@ -96,6 +96,10 @@ declare global {
|
||||
syncEnabledMcpToCodex: () => Promise<boolean>;
|
||||
importMcpFromClaude: () => Promise<number>;
|
||||
importMcpFromCodex: () => Promise<number>;
|
||||
// 读取当前生效(live)的 provider settings(根据 appType)
|
||||
// Codex: { auth: object, config: string }
|
||||
// Claude: settings.json 内容
|
||||
getLiveProviderSettings: (app?: AppType) => Promise<any>;
|
||||
testApiEndpoints: (
|
||||
urls: string[],
|
||||
options?: { timeoutSecs?: number },
|
||||
|
||||
Reference in New Issue
Block a user