Repository navigation
Releases: liu19666/dsh-model-block-picker
Release list
v1.2.0 — 来源改名写进模型注册表、指针拖拽排序、滑条视觉升级
Added
- Provider renaming (aliases): every row of the 显示设置 panel gained a ✎ button. The name you type is
written into the host model registry through/plugins/dsh-model-block-picker/aliases, so it is what the
grouped panel, the drill-down list and the stock/modelpopover display — not a plugin-local string
table that only this popover would honour. Aliases persist inaliases.jsoninside the DSH state
directory and are replayed on everyadapters-updatedevent and shortly after startup, because provider
entries are rebuilt each time the registry re-registers its adapters. The panel's top bar reports host
readiness and offers 同步到全部界面 (re-apply now) and 恢复默认 (drop the alias, restore the registry name). - Model-level drag reorder: inside an expanded provider in the settings panel, drag a model row to
reorder that provider's models — across as many rows as you like. The order is stored per provider and
drives the popover list, the search results and the drill-down alike.
Changed
- Provider dragging rewritten on pointer events (the previous implementation was HTML5 drag and drop,
where a drop only ever lands on the card under the cursor, so a card advanced one slot per drag). A card
now follows the pointer and can cross several cards in one gesture; the drop position is the new
position and the cards in between shift over. A 6 px threshold keeps taps distinct from drags, and a
260 ms post-drop cooldown stops a drag from being read as a drill-down click. - Reasoning slider visual pass: the track is 16 px with a soft aura under the filled part, each stop
carries its own hue that tints the active tick label and the value pill, twinkling sparks appear over the
fill while dragging, and the value pill shows a small glowing dot. The settings trigger is now a round
icon button, and cards / model rows expose a grip affordance. - Preference schema:
modelOrder(per-provider model order) joinedorder,hiddenProvidersand
hiddenModelsindsh-model-block-picker.prefs.v1; existing payloads keep working unchanged.
Fixed
- The "restore everything" action at the foot of the settings panel appeared only after some model had
been hidden. It now also appears once an order (providers or models) has been customised.
npm: https://www.npmjs.com/package/dsh-model-block-picker/v/1.2.0
Full changelog: https://github.com/liu19666/dsh-model-block-picker/blob/v1.2.0/CHANGELOG.md
v1.1.0 — 推理强度滑条、速度与详略自适应、显隐设置、拖拽排序
v1.1.0 — 四项体验修复。
修掉了深色模式下「当前选择」只剩一个白框、看不到字的问题;把推理强度从下拉框换成了可拖动的彩色滑条;给订阅类模型补上了速度与输出详略的独立控制;并新增了来源的显隐设置与拖拽排序。
效果
1. 深色模式不再白底白字
根因是强调色用了 --dsw-alias-brand-primary,这个 token 在深色主题下会反转成近白色(#f9fafb),于是选中模型的文字、卡片描边、「当前」徽标、焦点环全都变成白底白字。
现在统一改用 --dsw-alias-link(深色 #7aaaff,浅色 #4176e6),徽标在饱和填充上保留白色字。
2. 推理强度改成彩色滑条
从原生 <select> 换成可拖动的渐变滑条:
- 轨道按档位分段着色,thumb 带光晕;
- 刻度文字可点击直达该档;
- 右侧实时显示当前档位;
- 「恢复模型默认」一键回到提供方推荐值。
3. 速度与输出详略按模型自适应
新增两组分段控件:
- 速度 —— 标准 / 快速 / 极速
- 输出详略 —— 默认 / 简洁 / 均衡 / 详细
以 dsh-codex-subscription 的 openai-codex 为例,这两项通过它自己的 codex-subscription/preferences/* RPC 读写(DSH 核心 catalog 只暴露 reasoning,没有这两项)。
关键在于按模型自适应:preferences/models 返回 fastModels / ultrafastModels / verbosityModels 三张 id 表,只有当前选中的模型出现在对应表里,才渲染那一行,否则整行隐藏。切到不支持的模型(如 DeepSeek V4.1 Pro)时,速度和详略两行完全消失,不会出现死开关。
4. 显示设置与拖拽排序
搜索框左侧新增 ⚙ 按钮,打开显示设置面板:
- 每个提供方一级开关,整体隐藏;
- 展开后可逐个开关单个模型;
- 顶部显示已隐藏数量,底部一键恢复。
提供方卡片支持直接拖动排序:拖动时卡片半透明,目标位显示描边,松手即保存。
顺序、隐藏来源、隐藏模型全部持久化在 localStorage(dsh-model-block-picker.prefs.v1),失效的 id 会自动清理。
顺带修掉
- 刻度对齐 —— 刻度文字原本用
space-between平铺,与 thumb 各档位置对不齐;改为按档位绝对定位后精确对齐(实测 239 / 379 / 518 / 658)。 - 无障碍 —— 设置面板里的模型级开关原本是无名按钮,补上了
role="switch"/aria-checked/aria-label。
安装
从 npm 安装(推荐)
在 DSH 会话里对 Agent 说:
帮我从 npm 安装 dsh-model-block-picker 插件
Agent 会执行 plugin_manager(action: 'install_bundle', target: 'dsh-model-block-picker')。
或直接用命令行:
dsh plugin --profile desktop add dsh-model-block-picker发布包带有 SLSA provenance 签名,可溯源到本仓库的这次构建。
从源码安装
-
下载下面的 Source code (zip),解压。
-
在 DSH 会话里对 Agent 说:
帮我安装位于
<解压后的目录>的插件Agent 会执行
plugin_manager(action: 'install_bundle', target: '<绝对路径>')。 -
彻底退出 DSH 桌面端再重新打开(客户端 bundle 有启动基线缓存,仅刷新页面不一定加载新代码)。
卸载:plugin_manager(action: 'remove_bundle', target: 'dsh-model-block-picker'),回退到官方原生选择器。
已知限制
- 只替换输入框的模型位;
/model命令弹窗仍是官方样式(两者共用一份数据,切换互通)。 - 已寻址的 subagent 会话不提供模型选择(沿用官方约定)。
- 速度与输出详略依赖提供方暴露的能力,目前只有实现了这些偏好的提供方会被识别。
- 偏好保存在浏览器
localStorage,按浏览器 profile 隔离,不随 DSH 账号同步。
完整变更见 CHANGELOG。
v1.0.0 — 按来源分块的模型选择器
v1.0.0 — 第一个正式版本。
把 DSH 输入框里「所有模型拉成一条长列表」的官方选择器,换成先按来源渠道分块、再下钻进块内选模型的两级结构。搜索、推理强度(Reasoning Effort)、模型可用性等原有能力全部保留。
效果
点击输入框右下角的模型位 → 按来源分块的卡片网格:
- 全局搜索 —— 输入
v3/sonnet/r1即可跨全部来源聚合匹配,回车选中首项。 - 按来源分块 —— DeepSeek 账号、DeepSeek API、CodeBuddy / Qoder / TRAE 等各占一张卡片,标出模型数。
- 「当前」标记 —— 正在使用的来源高亮描边 + 角标。
- 推理强度 —— 支持 reasoning 的模型保留 Reasoning Effort 选择器。
触发按钮与同排的截图 / 麦克风图标保持同一设计语言(黑底 + 主题 off-white 描边与文字)。
安装
从源码目录安装(当前版本尚未发布到 npm/插件市场):
-
下载下面的 Source code (zip),解压。
-
在 DSH 会话里对 Agent 说:
帮我安装位于
<解压后的目录>的插件Agent 会执行
plugin_manager(action: 'install_bundle', target: '<绝对路径>')。 -
彻底退出 DSH 桌面端再重新打开(客户端 bundle 有启动基线缓存,仅刷新页面不一定加载新代码)。
卸载:plugin_manager(action: 'remove_bundle', target: 'dsh-model-block-picker'),回退到官方原生选择器。
实现要点
- 影射官方命名插槽
conversation.input.model(kind: "single"),以priority: -20覆盖原生组件(数值越低优先级越高;卸载即回退)。 - 复用
ctx.modelDirectories,与/model命令弹窗共用同一份会话级目录,不重复请求后端。 - 深色外观全部使用真实 DSH 主题 token(
--dsw-alias-label-primary等),而非硬编码颜色。
已知限制
- 只替换输入框的模型位;
/model命令弹窗仍是官方样式(两者共用一份数据,切换互通)。 - 已寻址的 subagent 会话不提供模型选择(沿用官方约定)。
完整变更见 CHANGELOG。