Skip to content

feat: 跟随 DSH 0.2.2-rc.1 —— 导航图标改用官方 settings.section.icon(0.5.1) - #13

Merged
xinspark merged 1 commit into
bennett-dsh:mainfrom
xinspark:release/0.5.1
Nov 4, 2026
Merged

xinspark merged 1 commit into
bennett-dsh:mainfrom
xinspark:release/0.5.1

Conversation

@xinspark

@xinspark xinspark commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

0.5.1:跟随 DSH 0.2.2-rc.1

为什么

本地 DSH 从 0.2.1-rc.4 升到 0.2.2-rc.1。核对结论:

  • engines.dsh 不用改:0.2.2-rc.1 仍落在 >=0.2.1-rc.3 <0.3.0 内 —— DSH 的
    evaluatePluginCompatibility 用 semver.satisfies(..., { includePrerelease: true })
    判定(dsh-app-boot/lib/index.js:1094-1096),预发布版参与区间匹配。
  • 数据面没变:会话持久化 list() / read(offset, length, options) 签名不变;
    tokenUsage 投影字段不变(只有 contextPressure 多了 summary: false);
    settings.section / conversation.composer.dock 槽位契约不变。
  • 两个原生契约门在这版上照样通过:verify:typert(4 端点)、verify:remote(7/7)。

改了什么

1. 导航图标改走官方槽位(净删约 50 行)

0.2.2-rc.1 新增 settings.section.icon(list / inline / root,契约在
@deepseek-ai/dsh-client-ui-settings-general):nav rows 用
renderSlot("settings.section.icon", { size, active }, { only: row.id }) 渲染,
注册 id 必须等于 section id,对不上就永不渲染、也不报错。

这正是 0.2.1 时代那段 DOM 补缺注释里写的「官方一旦补上就整体删除」——现在删掉:
属性标记 + CSS mask + MutationObserver 全部移除,换成一次 slots.register。
旧内核没有这个槽时 inject 不触发,行内图标退化成官方齿轮,其余不变。

2. 依赖基线跟进

字段 0.5.0 0.5.1
peerDependencies["@deepseek-ai/cordis"] ~4.0.5 ~4.1.0
devDependencies["@deepseek-ai/cordis"] ~4.0.5 ~4.1.0
dependencies["@deepseek-ai/schemastery"] ~3.18.5 ~3.19.0
dsh.verifiedAgainst 0.2.1-rc.4 0.2.2-rc.1
dsh.client.inject — 增加 @deepseek-ai/dsh-client-ui-settings-general

验证

  • npm test:228 / 228。新增 tests/client-settings-icon.test.js(4 条:注册 id 必须等于
    section id、旧 DOM 补缺必须删净、图标按 size 渲染且只用 currentColor、dsh.client.inject
    必须声明槽位归属模块)。
  • npm run verify:typert:OK(4 端点,namespace dsh-plugin-usage)
  • npm run verify:remote:7/7
  • 逐文件比对 0.2.1-rc.4 → 0.2.2-rc.1 的 dsh-session、dsh-session-persistence-jsonl、
    dsh-session-projection、dsh-token-meter、dsh-client-ui-conversation、
    dsh-client-ui-settings、dsh-typert-registry:本插件依赖的签名均未变。

发布

tag 与 npm publish 留到合并之后(本机 npm 登录态已失效,需先
npm login --registry=https://registry.npmjs.org/)。

…host dependency

DSH 0.2.2-rc.1 added the official settings.section.icon slot (list / inline /
root, declared by dsh-client-ui-settings-general, rendered with {size, active}
and {only: row.id}). The plugin had carried a DOM workaround for exactly this
gap - row marking plus a CSS mask - with a note that it must be deleted once
the slot exists. This removes it and registers the glyph the native way.

- nav icon: slots.inject('settings.section.icon') with id 'token-stats'
  (the contract matches on the section id; a mismatch renders nothing, no error)
- delete installSettingsNavIcon / NAV_ICON_MASK / NAV_ICON_CSS; older kernels
  simply fall back to the official gear
- cordis peer+dev ~4.0.5 -> ~4.1.0; schemastery ~3.18.5 -> ~3.19.0 (host parity)
- dsh.client.inject += @deepseek-ai/dsh-client-ui-settings-general
- dsh.verifiedAgainst 0.2.1-rc.4 -> 0.2.2-rc.1; engines.dsh unchanged
  (0.2.2-rc.1 satisfies >=0.2.1-rc.3 <0.3.0 under includePrerelease)
- tests 234 -> 238 (tests/client-settings-icon.test.js)
- CHANGELOG: fold these items into the pending 0.5.1 section and restore
  descending order (0.4.0 sat above 0.5.0)
@xinspark
xinspark merged commit 5568b6a into bennett-dsh:main Nov 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant