fix: preserve indexed plugin diagnostics · openclaw/openclaw@b3ac316
steipete
·
2026-04-26
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -238,7 +238,7 @@ describe("loadGatewayRuntimeConfigSchema", () => {
|
238 | 238 | loadGatewayRuntimeConfigSchema(); |
239 | 239 | loadGatewayRuntimeConfigSchema(); |
240 | 240 | |
241 | | -expect(mockLoadPluginManifestRegistry).toHaveBeenCalledTimes(3); |
| 241 | +expect(mockLoadPluginManifestRegistry).toHaveBeenCalledTimes(6); |
242 | 242 | for (const call of mockLoadPluginManifestRegistry.mock.calls) { |
243 | 243 | expect(call[0]).toMatchObject({ cache: false }); |
244 | 244 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -50,6 +50,12 @@ export function loadPluginManifestRegistryForInstalledIndex(params: {
|
50 | 50 | return { plugins: [], diagnostics: [] }; |
51 | 51 | } |
52 | 52 | const pluginIdSet = params.pluginIds?.length ? new Set(params.pluginIds) : null; |
| 53 | +const diagnostics = pluginIdSet |
| 54 | + ? params.index.diagnostics.filter((diagnostic) => { |
| 55 | +const pluginId = diagnostic.pluginId; |
| 56 | +return !pluginId || pluginIdSet.has(pluginId); |
| 57 | +}) |
| 58 | + : params.index.diagnostics; |
53 | 59 | const candidates = params.index.plugins |
54 | 60 | .filter((plugin) => params.includeDisabled || plugin.enabled) |
55 | 61 | .filter((plugin) => !pluginIdSet || pluginIdSet.has(plugin.pluginId)) |
@@ -60,6 +66,7 @@ export function loadPluginManifestRegistryForInstalledIndex(params: {
|
60 | 66 | env: params.env, |
61 | 67 | cache: false, |
62 | 68 | candidates, |
| 69 | +diagnostics: [...diagnostics], |
63 | 70 | installRecords: extractPluginInstallRecordsFromInstalledPluginIndex(params.index), |
64 | 71 | }); |
65 | 72 | } |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。