Repository navigation
Releases: loyalchiiina/dsh-model-fold
Releases · loyalchiiina/dsh-model-fold
Release list
v0.5.1
v0.5.0 - 悬浮模式 + 菜单内设置条
新增 / Added
- 悬浮模式(新默认):鼠标划过来源标题即从右侧滑出该来源的模型,移开自动收起(延迟 260ms,避免掠过间隙时闪烁)。无需点击即可选模型。
- 同一产品线此前需单击来源才滑出;现在「悬停」成为默认交互。
- 三模式循环:
悬浮 → 面板 → 列表,双击任意来源标题切换。
- 菜单内设置条:菜单底部新增一行按钮,可直接切模式(悬浮 / 面板 / 列表)与调字号(
10 / 11 / 12 / 13)。position:sticky;bottom:0—— 菜单滚动时始终可见。- 字号写入
documentElement的--mf-fs,菜单与侧边面板同步生效,选择持久化。 - 按钮的
mousedown/click均stopPropagation,不会触发宿主的「点击外部关闭」。
- 用法提示行:菜单顶部显示小字
双击来源标题可切换展开方式(当前:悬浮展开),降低新用户上手门槛。 - 模式默认值迁移:老用户
localStorage里若存着旧默认值panel(非主动选择),一次性迁移到hover;迁移后若用户再次显式选择panel,则尊重其选择(迁移标记保证只做一次)。
修复 / Fixed
- 🔴 来源标题(分组标题)的全部自定义样式从未生效。
- 根因:内核
MenuGroup渲染的section[role="group"]第一个子元素是span[data-menu-group-start],而插件 CSS 一直用section[role="group"] > div:first-child(要求首个子元素是div)定位标题 —— 选择器永不匹配。 - 影响面:折叠箭头 ▾/▸、悬停高亮、「当前来源」品牌色高亮与徽标(
当前·模型名)等 10 条 CSS 规则全部失效;用户因此长期看不到「当前用的是哪个来源下的哪个模型」。 - 修法:改用内核显式提供的属性钩子
[data-menu-group-heading](CSS 10 处 + JS 兜底查找 4 处),比任何位置选择器都稳定。
- 根因:内核
- 字号切换「时好时坏」
- 根因:
paneSignature()把菜单每个子节点的index + tagName + className拼进签名,用于判断菜单视图是否切换。设置的按钮每次重建会改变签名 → 被误判为「pane 切换」→resetView()清掉自建 DOM → 按钮事件与状态丢失。 - 修法三条:① 签名计算排除插件自建节点(提示条 / 设置条);② 设置条改为幂等更新,只在首次创建按钮,之后仅刷新高亮,不再增删节点;③ 字号点击只调
syncConfigBar()(只改data-on),不再触发resetMenuGroups/enhance。
- 根因:
- 字号整体调小:正文 15px → 11px、行高 22px → 16px、条目高 38px → 32px → 28px、箭头 12px → 10px(并接入
--mf-fs变量,由设置条控制)。
文档 / Docs
- README 重写「三种模式」章节,配
docs/images/mode-hover.png(悬浮模式)与docs/images/mode-list.png(列表模式)两张效果图。 package.json描述同步更新为「悬停滑出 + 面板内切换模式与字号」。
All notable changes to this project are documented in this file.
v0.4.8 - official DSH compatibility declarations
Release v0.4.8 of dsh-model-fold.
No functional change. This release corrects the compatibility declarations to
match the official DSH plugin spec:
- Declares the official DSH peer requirements in
peerDependenciesand
devDependencies:@deepseek-ai/cordis^4.0.2,@deepseek-ai/dsh
>=0.1.7-rc.1. The kernel checks peer dependencies, notengines.dsh. - Corrects
engines.dshfrom a client/shell version to the kernel version.
^0.1.7does not match the pre-release kernel0.1.7-rc.2, so the range
uses an explicit pre-release lower bound.
The attached tarball is the prebuilt package, identical to the one published to
npm as dsh-model-fold@0.4.8 (same integrity:
sha512-pMCVFbofmPq3x2E3RskIpPaH2JkrS08xoRFqrrlL8RAJjNHXw9VgtWdzgm+/p01AEZrPrAZEh8cs460xMATBcQ==).
Install:
dsh plugin --profile web add dsh-model-fold
v0.4.7 - fix panel flicker / dead click / transparent panel
v0.4.7
Fixes three defects that all came from coupling with the host component's own behaviour, and unifies the styling of both menu levels.
Fixed
- Side panel flickered and vanished. Collapsing a provider hides its real model buttons with
display:none, but the host focuses the currently selected model button when the model list opens. Hiding the focused element forces a blur withrelatedTarget = null, and the host's rootonBlurthen closes the whole menu. The plugin now moves focus back to the menu trigger before hiding anything. - Clicking a provider did nothing. Handlers were bound to the React-managed heading, which React replaces on re-render, so the handler sat on a detached node. All interaction now goes through one capture-phase delegate on
document. - Panel was transparent with unreadable text. The host menu's real background comes from
--dsw-specific-menu, whose value is an 8-digit hex such as#43454a73(alpha approx 45%).parseColornow handles 8-digit hex, and the translucent surface colour is composited over the ancestor colour to yield an equivalent opaque colour.
Changed
- Provider list and model subset share identical typography and metrics (15px / weight 600 / line-height 22px, 38px rows, 8px 10px padding) and the same colour tokens.
- Selection check mark enlarged to 16px, bold, brand colour; selected row gains a brand-coloured left bar.
- Singleton guard:
dispose()removes every listener and timer, and a new instance tears down the previous one first. - All temporary diagnostic instrumentation removed.
Compatibility
- DSH kernel 2.0.15-next
- Official
@deepseek-ai/dsh-client-ui-model-selection0.1.7-rc.2
See the README sections "Compatibility" and "How it works" for details.