perf: avoid duplicate provider policy artifact misses · openclaw/openclaw@99b1726
steipete
·
2026-05-06
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -102,10 +102,13 @@ export function resolveBundledProviderPolicySurface(
|
102 | 102 | if (!normalizedProviderId) { |
103 | 103 | return null; |
104 | 104 | } |
105 | | -return ( |
106 | | -tryLoadBundledProviderPolicySurface(normalizedProviderId) ?? |
107 | | -tryLoadBundledProviderPolicySurface( |
108 | | -resolveBundledProviderPolicyPluginId(normalizedProviderId, options) ?? normalizedProviderId, |
109 | | -) |
110 | | -); |
| 105 | +const directSurface = tryLoadBundledProviderPolicySurface(normalizedProviderId); |
| 106 | +if (directSurface) { |
| 107 | +return directSurface; |
| 108 | +} |
| 109 | +const ownerPluginId = resolveBundledProviderPolicyPluginId(normalizedProviderId, options); |
| 110 | +if (!ownerPluginId || ownerPluginId === normalizedProviderId) { |
| 111 | +return null; |
| 112 | +} |
| 113 | +return tryLoadBundledProviderPolicySurface(ownerPluginId); |
111 | 114 | } |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。