fix: add import button for OpenCode/OpenClaw empty state and remove auto-import on startup

Previously OpenCode and OpenClaw auto-imported providers from live config
on app startup, which could confuse users. Now they follow the same
pattern as Claude/Codex/Gemini: manual import via the empty state button.
This commit is contained in:
Jason
2026-02-27 11:50:38 +08:00
parent 3bd0a7c02c
commit b2b20dadd7
3 changed files with 21 additions and 29 deletions
+8
View File
@@ -110,6 +110,14 @@ export const providersApi = {
async getOpenClawLiveProviderIds(): Promise<string[]> {
return await invoke("get_openclaw_live_provider_ids");
},
/**
* 从 OpenClaw live 配置导入供应商到数据库
* OpenClaw 特有功能:由于累加模式,用户可能已在 openclaw.json 中配置供应商
*/
async importOpenClawFromLive(): Promise<number> {
return await invoke("import_openclaw_providers_from_live");
},
};
// ============================================================================