fix: typecheck sparse plugin metadata handling · openclaw/openclaw@2294f5c
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -112,7 +112,9 @@ export function createModelListAuthIndex(
|
112 | 112 | addProvider(provider); |
113 | 113 | } |
114 | 114 | } |
115 | | -const primaryModelProvider = params.cfg.agents?.defaults?.model?.primary?.split("/", 1)[0]; |
| 115 | +const defaultModel = params.cfg.agents?.defaults?.model; |
| 116 | +const primaryModel = typeof defaultModel === "string" ? defaultModel : defaultModel?.primary; |
| 117 | +const primaryModelProvider = primaryModel?.split("/", 1)[0]; |
116 | 118 | if (primaryModelProvider === "openai-codex" || primaryModelProvider === "codex") { |
117 | 119 | addSyntheticProvider("codex"); |
118 | 120 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -214,7 +214,7 @@ function loadPluginMetadataSnapshotImpl(
|
214 | 214 | config: params.config, |
215 | 215 | workspaceDir: params.workspaceDir, |
216 | 216 | env: params.env, |
217 | | -diagnostics: index.diagnostics, |
| 217 | +diagnostics: [...index.diagnostics], |
218 | 218 | installRecords: index.installRecords, |
219 | 219 | }) |
220 | 220 | : loadPluginManifestRegistryForInstalledIndex({ |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。