mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 23:10:43 +00:00
perf: avoid duplicate provider policy artifact misses
This commit is contained in:
@@ -102,10 +102,13 @@ export function resolveBundledProviderPolicySurface(
|
||||
if (!normalizedProviderId) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
tryLoadBundledProviderPolicySurface(normalizedProviderId) ??
|
||||
tryLoadBundledProviderPolicySurface(
|
||||
resolveBundledProviderPolicyPluginId(normalizedProviderId, options) ?? normalizedProviderId,
|
||||
)
|
||||
);
|
||||
const directSurface = tryLoadBundledProviderPolicySurface(normalizedProviderId);
|
||||
if (directSurface) {
|
||||
return directSurface;
|
||||
}
|
||||
const ownerPluginId = resolveBundledProviderPolicyPluginId(normalizedProviderId, options);
|
||||
if (!ownerPluginId || ownerPluginId === normalizedProviderId) {
|
||||
return null;
|
||||
}
|
||||
return tryLoadBundledProviderPolicySurface(ownerPluginId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user