Fix provider display (#641)

This commit is contained in:
paisley
2026-03-23 19:11:53 +08:00
committed by GitHub
Unverified
parent c6021cedf4
commit 859e3fd6c5
4 changed files with 162 additions and 58 deletions

View File

@@ -285,8 +285,9 @@ export async function getAllProvidersWithKeyInfo(): Promise<
const openClawKey = getOpenClawProviderKeyForType(provider.type, provider.id);
const isActive = activeOpenClawProviders.has(provider.type) || activeOpenClawProviders.has(provider.id) || activeOpenClawProviders.has(openClawKey);
if (configMissing || (!isBuiltin && !isActive)) {
console.log(`[Sync] Provider ${provider.id} (${provider.type}) missing from OpenClaw, dropping from ClawX UI`);
await deleteProvider(provider.id);
console.log(`[Sync] Provider ${provider.id} (${provider.type}) missing from OpenClaw, hiding from UI`);
// Skip from display but don't delete from store — preserves API key
// associations so that restoring openclaw.json brings accounts back intact.
continue;
}