dsh-plugin-litellm-bridge 2.0.4 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -464,10 +464,18 @@ window.__ModuleLoader__.load({
464
464
 
465
465
  test && h('div', { style: S.card },
466
466
  h('div', { style: { marginBottom: 8, fontWeight: 600 } },
467
+ // 【血案】这里原来写的是 { style: S.ok } / { style: S.err }。
468
+ // S.ok / S.err 是**颜色字符串**('var(--dsw-alias-...)'),
469
+ // 是给 color: 用的,不是样式对象。
470
+ // React 对 style 收字符串直接抛 Minified React error #62:
471
+ // "The style prop expects a mapping from style properties to
472
+ // values, not a string."
473
+ // 表现:点「测试连通性」→ 整个设置页白屏。
474
+ // 正确写法是 { style: { color: S.ok } }。
467
475
  test.ok
468
- ? h('span', { style: S.ok },
476
+ ? h('span', { style: { color: S.ok } },
469
477
  `✓ 连通正常(${num(test.passed)}/${num(test.total)})`)
470
- : h('span', { style: S.err },
478
+ : h('span', { style: { color: S.err } },
471
479
  `✗ 连通异常(${num(test.passed)}/${num(test.total)})`),
472
480
  ),
473
481
  // 【防御】steps 里任何字段都可能是非字符串(对象/undefined/错误实例)。
@@ -476,7 +484,11 @@ window.__ModuleLoader__.load({
476
484
  (Array.isArray(test.steps) ? test.steps : []).map((s, i) => h('div', {
477
485
  key: i, style: { display: 'flex', gap: 8, padding: '4px 0', alignItems: 'baseline', flexWrap: 'wrap' },
478
486
  },
479
- h('span', { style: s?.ok ? S.ok : S.err }, s?.ok ? '✓' : '✗'),
487
+ // 【血案 2】这里原来是 { style: s?.ok ? S.ok : S.err } —— 三元的结果
488
+ // 依然是**颜色字符串**,style 收到字符串就抛 React #62。
489
+ // 上一轮我只修了上面的 test.ok 分支,漏了这个三元形态,
490
+ // 所以「点测试连通性」依旧白屏。必须包成 { color: ... }。
491
+ h('span', { style: { color: s?.ok ? S.ok : S.err } }, s?.ok ? '✓' : '✗'),
480
492
  h('span', { style: { minWidth: 110 } }, safeText(s?.name)),
481
493
  h('span', { style: { ...S.mono, opacity: 0.6 } }, safeText(s?.path)),
482
494
  h('span', { style: { ...S.mono, opacity: 0.85, marginLeft: 'auto', textAlign: 'right', wordBreak: 'break-all' } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-litellm-bridge",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "LiteLLM gateway bridge for DSH: assemble root / coder / research fallback chains from the DSH model pool and hand the order to a LiteLLM gateway that executes retries and fallbacks. The plugin performs no routing itself.",
5
5
  "keywords": [
6
6
  "dsh",