fix conflict
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
getProviderSecret,
|
||||
setProviderSecret,
|
||||
} from '../services/secrets/secret-store';
|
||||
import { getOpenClawProviderKeyForType } from './provider-keys';
|
||||
|
||||
/**
|
||||
* Provider configuration
|
||||
@@ -276,9 +277,7 @@ export async function getAllProvidersWithKeyInfo(): Promise<
|
||||
// e.g. provider.id "custom-a1b2c3d4-..." → strip hyphens → "customa1b2c3d4..." → slice(0,8) → "customa1"
|
||||
// → openClawKey = "custom-customa1"
|
||||
// This must match getOpenClawProviderKey() in ipc-handlers.ts exactly.
|
||||
const openClawKey = (provider.type === 'custom' || provider.type === 'ollama')
|
||||
? `${provider.type}-${provider.id.replace(/-/g, '').slice(0, 8)}`
|
||||
: provider.type === 'minimax-portal-cn' ? 'minimax-portal' : provider.type;
|
||||
const openClawKey = getOpenClawProviderKeyForType(provider.type, provider.id);
|
||||
if (!isBuiltin && !activeOpenClawProviders.has(provider.type) && !activeOpenClawProviders.has(provider.id) && !activeOpenClawProviders.has(openClawKey)) {
|
||||
console.log(`[Sync] Provider ${provider.id} (${provider.type}) missing from OpenClaw, dropping from ClawX UI`);
|
||||
await deleteProvider(provider.id);
|
||||
|
||||
Reference in New Issue
Block a user