dsh-model-select-style
Manifest validDSH web plugin: Replace the input box model selection control with two independent buttons (supplier + model two-level linkage, supporting inference level adjustment)
dsh-model-select-style
⚠️ 已弃用(Deprecated):功能已合并进 dsh-ui-tools(模型选择双按钮为其「功能一」),请改用 dsh-ui-tools。本仓库不再维护。
DSH Web 插件:把输入框官方的「模型选择」控件替换为两个独立按钮(供应商选择 + 模型选择),两级联动,不触碰其他界面元素,不改 DSH 任何一行源码。
交互方式
- 「供应商」按钮 —— 点击弹出供应商列表(如 DeepSeek / SiliconFlow / OpenRouter);
- 选中某供应商后,「模型」按钮亮起;
- 「模型」按钮 —— 点击只列出当前所选供应商的模型,点选即切换。
选择逻辑完全复用官方组件(同一份模型目录、同一套选择提交、错误 Toast、推理等级),只是把入口从单个按钮拆成两个。
实现原理
- 官方组件照常注册在
conversation.input.model(数据/提交逻辑原样保留),用 CSS 把官方触发按钮隐藏(display:none); - 本插件通过
modelDirectories服务读取同一份模型目录(groups = 供应商分组),注册到conversation.input.right(list slot)追加两个自绘按钮; - 选择模型时调用官方
directory.select({ provider, model }),官方 store 同步更新,输入框状态与原生一致。
调参
打开 lib/client.js,顶部 knobs 区改完保存:
const knobs = {
accent: "var(--dsw-alias-brand-primary)", // 或写死 "#4d6bfe"
buttonHeight: "28px",
buttonTint: "8%", // 按钮静止态强调色浓度
buttonTintHover: "16%", // 悬停浓度
buttonRadius: "8px", // 按钮圆角(非胶囊)
menuRadius: "12px",
menuOpacity: "90%", // 面板底色不透明度
menuBlur: "14px", // 面板背景模糊
optionRadius: "8px",
motion: ".16s cubic-bezier(.4, 0, .2, 1)"
};
保存后刷新网页即可生效(bundle 内容变化会重新计算 rev 缓存),无需重启。 注意:首次把插件登记进 profile 后需要重启一次 DSH;重启完成后再调参只需刷新页面。
演示
demo/ 目录:
two-button.html— 可交互模拟(点供应商→选供应商→点模型→选模型)two-button-provider-open.html— 供应商面板展开快照two-button-model-open.html— 已选 DeepSeek、模型面板展开快照
安装方式
方式一:从 GitHub 安装(推荐)
dsh plugin --profile web add github:qgx1992/dsh-model-select-style
或手动在 ~/.dsh/profiles/web/package.json:
- dependencies 加
"dsh-model-select-style": "github:qgx1992/dsh-model-select-style" dsh.profile.bundles加"dsh-model-select-style"- 在 profiles/web 目录执行
pnpm install,然后重启 DSH。
方式二:本地开发
- 插件源码位于
~/.dsh/local-plugins/dsh-model-select-style/ ~/.dsh/profiles/web/package.json:- dependencies 加
"dsh-model-select-style": "link:C:/Users/QIU/.dsh/local-plugins/dsh-model-select-style" dsh.profile.bundles加"dsh-model-select-style"
- dependencies 加
- 在 profiles/web 目录执行
pnpm install,然后重启 DSH。
注意:首次登记进 profile 后需要重启一次 DSH;之后调整
lib/client.js只需刷新页面。
停用 / 卸载
- 临时停用:设置 → 插件 中停用本插件即可回到官方原生模型选择。
- 彻底卸载:从 bundles 与 dependencies 移除条目、删除 profiles/web/node_modules 内链接与 local-plugins 目录。
明确不覆盖的范围
- 输入框里输
/model弹出的命令面板选择器走的是另一套 popupSelect 组件,本插件未涉及。 - 「推理等级」选择仍在官方下拉菜单中(模型按钮点选模型后,官方 toast/等级面板不受影响)。
Comments
Loading…
Similar plugins
by genius-alray
DSH Web UI 模型选择器替换插件:对话框式模型选择(模糊搜索 / 供应商折叠分组 / 收藏 / 思考档位下拉),官方 bundle 形态。
★ 3
JavaScript
Sep 29, 2026
dsh plugin --profile web add dsh-model-pickerby chancoki
为 DeepSeek Harness (DSH) Web GUI 提供模型搜索功能的插件——在模型选择弹窗中添加关键字搜索框,快速筛选模型。
★ 0
JavaScript
Sep 7, 2026
dsh plugin --profile web add dsh-model-search-pluginby AkotaP
DSH web plugin: a Model Capabilities page in Settings — manage per-model Context Window, Max Output, Input Modalities and Reasoning Levels (Default = drop the field), plus global preset lists.
★ 0
MIT
JavaScript
Sep 28, 2026
dsh plugin --profile web add dsh-model-tweaksby pgnqukezrdxmhjso
DSH Web UI 强化插件:功能模块可开关,含提供方标签、级联模型选择器、设置面板拖动 等
★ 0
MIT
TypeScript
Sep 28, 2026
dsh plugin --profile web add dsh-ui-fortifierby KouzakiUmi
DSH 插件:为实际启用的模型提供可读名称,统一美化 provider / 模型选择器与设置页;只改 UI 展示,不改变模型 ID、路由、凭据或请求。
★ 0
MIT
JavaScript
Oct 26, 2026
dsh plugin --profile web add dsh-model-namesby Triple3h
DSH Web plugin: per-model reasoning-effort configuration and selection — settings page + slider embedded in the model picker. DSH Web 插件:逐模型推理力度配置与选择(设置页 + 模型选择器内嵌滑块)。
★ 0
MIT
JavaScript
Aug 23, 2026
dsh plugin --profile web add dsh-reasoning-effort