dsh-plugin-model-provider
DeepSeek Harness plugin — append the provider/platform name after the model name in the chat input area.
中文
功能
在 DeepSeek Harness 的对话界面中,模型名后面追加该模型所属平台的名称。
生效范围:
| 位置 | 效果 |
|---|---|
| 输入框上方的模型按钮 | DeepSeek-V4.1-Flash(DeepSeek 账号) |
| 弹层「模型」行 | DeepSeek-V4.1-Flash(DeepSeek 账号) |
| 下拉候选列表每一项 | 保持原样,不带平台名 |
平台名用次要文字色、略小字号显示,不影响模型名的主视觉。官方 1017 徽标也会保留。
截图示例
弹层:
模型 DeepSeek-V4.1-Flash(DeepSeek 账号) 1017 ›
推理等级 high ›
输入框上方按钮:
[DeepSeek-V4.1-Flash(WorkBuddy) ▾]
下拉候选列表:
DeepSeek-V4.1-Flash ← 不带平台名
gpt-6-sol
kimi-k3
安装
方式一:file 依赖(本地开发)
- 将本目录放到你的工作区或任意位置。
- 在你的 DSH profile 目录(通常为
~/.dsh/profiles/desktop/)下编辑package.json:{ "dependencies": { "dsh-plugin-model-provider": "file:/path/to/dsh-plugin-model-provider" }, "dsh": { "profile": { "bundles": ["dsh-plugin-model-provider"] } } } - 在 profile 的
cordis.patch.yml末尾追加:# 本地插件:在「模型」行与输入框上方的模型按钮里,模型名后追加平台名。 - insert: - id: ui-model-provider-label name: 'dsh-plugin-model-provider' - 将插件复制到
~/.dsh/profiles/desktop/node_modules/dsh-plugin-model-provider/。 - 重启 DeepSeek Harness。
方式二:dsh plugin add(如果可用)
dsh plugin add /path/to/dsh-plugin-model-provider
注意:某些 DSH 版本的
dsh plugin add存在文件锁问题(EPERM onpackage.json.lock),此时请使用方式一手动安装。
工作原理
本插件注册到 conversation.input.model.label 插槽(priority: -1),接管官方插件的模型标签渲染:
placement === "option"(下拉候选):直接返回model.name,保持原样。placement === "trigger"或"menu":渲染模型名(平台名),并复刻官方 1017 徽标逻辑。
平台名取自 provider.name(已是本地化显示名),自动去除尾部括号限定词以避免双层括号。
兼容性
- DeepSeek Harness >= 0.2.1-rc.3
- React ^18.2.0
- 仅 Web 平台(
dsh.client.platform: "web")
文件说明
| 文件 | 说明 |
|---|---|
package.json |
插件清单 |
cordis.patch.yml |
bundle patch 声明 |
lib/index.js |
服务端入口(空 apply) |
lib/client.js |
浏览器侧组件(渲染逻辑) |
回退
删除 node_modules/dsh-plugin-model-provider/,从 profile package.json 的 dependencies 和 dsh.profile.bundles 移除本插件,删掉 cordis.patch.yml 末尾的 insert 段,重启即可恢复。
编码说明
所有文件使用 无 BOM 的 UTF-8 编码。DSH 的 resolveMeta() 使用 JSON.parse(readFileSync(path, "utf8")) 读取 package.json,不去 BOM,带 BOM 会报 SyntaxError: Unexpected token '\uFEFF'。这与官方所有插件保持一致。
License
MIT
English
What it does
Appends the provider/platform name after the model name in the DeepSeek Harness chat input area.
Where it takes effect:
| Location | Result |
|---|---|
| Model button above the input box | DeepSeek-V4.1-Flash(DeepSeek 账号) |
| "Model" row in the popup menu | DeepSeek-V4.1-Flash(DeepSeek 账号) |
| Each item in the dropdown candidate list | Unchanged — no platform name |
The platform name is rendered in a muted caption color at a slightly smaller font size. The official "1017" badge is preserved.
Example
Popup menu:
Model DeepSeek-V4.1-Flash(DeepSeek 账号) 1017 ›
Effort high ›
Input trigger button:
[DeepSeek-V4.1-Flash(WorkBuddy) ▾]
Dropdown candidates:
DeepSeek-V4.1-Flash ← no platform name
gpt-6-sol
kimi-k3
Installation
Option 1: file dependency (local dev)
- Place this directory in your workspace or anywhere on disk.
- In your DSH profile directory (typically
~/.dsh/profiles/desktop/), editpackage.json:{ "dependencies": { "dsh-plugin-model-provider": "file:/path/to/dsh-plugin-model-provider" }, "dsh": { "profile": { "bundles": ["dsh-plugin-model-provider"] } } } - Append to the profile's
cordis.patch.yml:- insert: - id: ui-model-provider-label name: 'dsh-plugin-model-provider' - Copy the plugin into
~/.dsh/profiles/desktop/node_modules/dsh-plugin-model-provider/. - Restart DeepSeek Harness.
Option 2: dsh plugin add (if available)
dsh plugin add /path/to/dsh-plugin-model-provider
Note: Some DSH versions have a file-lock issue with
dsh plugin add(EPERM onpackage.json.lock). Use Option 1 in that case.
How it works
Registers into the conversation.input.model.label slot at priority: -1 (lower than the official plugin's default 0), taking over model label rendering:
placement === "option"(dropdown): returnsmodel.nameunchanged.placement === "trigger"or"menu": rendersModel Name(Platform)and replicates the official 1017 badge logic.
The platform name comes from provider.name (already localized). Trailing parenthesized qualifiers are stripped to avoid double parentheses.
Compatibility
- DeepSeek Harness >= 0.2.1-rc.3
- React ^18.2.0
- Web only (
dsh.client.platform: "web")
Files
| File | Description |
|---|---|
package.json |
Plugin manifest |
cordis.patch.yml |
Bundle patch declaration |
lib/index.js |
Server entry (no-op apply) |
lib/client.js |
Browser-side component (rendering logic) |
Rollback
Remove node_modules/dsh-plugin-model-provider/, remove the entry from dependencies and dsh.profile.bundles in the profile package.json, delete the insert block at the end of cordis.patch.yml, and restart.
Encoding note
All files use UTF-8 without BOM. DSH's resolveMeta() reads package.json via JSON.parse(readFileSync(path, "utf8")) without stripping BOM — a BOM would cause SyntaxError: Unexpected token '\uFEFF'. This matches all official plugins.
License
MIT
No comments yet. Be the first to write one.