dsh-model-visibility 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +48 -48
- package/README.md +48 -48
- package/lib/client.js +521 -474
- package/lib/client.js.map +1 -1
- package/lib/index.js +14 -13
- package/lib/types/client/ModelVisibilityCard.d.ts +1 -1
- package/lib/types/client/controller.d.ts +15 -7
- package/lib/types/client/index.d.ts +8 -9
- package/lib/types/client/locales.d.ts +1 -1
- package/lib/types/index.d.ts +35 -10
- package/lib/types/namespace.d.ts +17 -0
- package/package.json +87 -83
package/README.en.md
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
# dsh-model-visibility
|
|
2
|
-
|
|
3
|
-
**English · [中文](README.md)**
|
|
4
|
-
|
|
5
|
-
Model visibility for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): control which models appear in the conversation model selector.
|
|
6
|
-
|
|
7
|
-
Installs a dedicated **Model visibility** settings section (right after 模型 / Models in the left nav):
|
|
8
|
-
|
|
9
|
-
- 🔍 **Search** — live filter by model name / id / provider
|
|
10
|
-
- 🎚️ **Per-model switches** — hide a model and it disappears from the selector instantly; flip back to restore
|
|
11
|
-
- 📦 **Provider-level batch** — hide or show every model of one provider in one click
|
|
12
|
-
- ♻️ **Reset all** — clear the hidden list
|
|
13
|
-
- 🛡️ **Zero intrusion** — writes only the plugin's own hidden list, never your provider config; hiding a model a session already uses never interrupts that session
|
|
14
|
-
- 🆕 **New models visible by default** — the plugin remembers what to hide, not what to show
|
|
15
|
-
|
|
16
|
-
## Preview
|
|
17
|
-
|
|
18
|
-

|
|
19
|
-
|
|
20
|
-
## Requirements
|
|
21
|
-
|
|
22
|
-
- DeepSeek Harness ≥ 0.
|
|
23
|
-
- Node.js 22+
|
|
24
|
-
|
|
25
|
-
## Install
|
|
26
|
-
|
|
27
|
-
```sh
|
|
28
|
-
dsh plugin --profile web add dsh-model-visibility
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Restart `dsh web` to activate.
|
|
32
|
-
|
|
33
|
-
## How it works
|
|
34
|
-
|
|
35
|
-
- **Host half** (`lib/index.js`):
|
|
36
|
-
- **Browser half** (`lib/client.js`): registers a `settings.section` page; page state is the union of the filtered catalog and the hidden entries, each hidden entry labeled by the display-name snapshot captured when it was hidden.
|
|
37
|
-
|
|
38
|
-
## Uninstall
|
|
39
|
-
|
|
40
|
-
```sh
|
|
41
|
-
dsh plugin --profile web remove dsh-model-visibility
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Uninstalling restores everything: the plugin never writes provider config, and the hidden list dies with the package.
|
|
45
|
-
|
|
46
|
-
## License
|
|
47
|
-
|
|
48
|
-
MIT
|
|
1
|
+
# dsh-model-visibility
|
|
2
|
+
|
|
3
|
+
**English · [中文](README.md)**
|
|
4
|
+
|
|
5
|
+
Model visibility for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): control which models appear in the conversation model selector.
|
|
6
|
+
|
|
7
|
+
Installs a dedicated **Model visibility** settings section (right after 模型 / Models in the left nav):
|
|
8
|
+
|
|
9
|
+
- 🔍 **Search** — live filter by model name / id / provider
|
|
10
|
+
- 🎚️ **Per-model switches** — hide a model and it disappears from the selector instantly; flip back to restore
|
|
11
|
+
- 📦 **Provider-level batch** — hide or show every model of one provider in one click
|
|
12
|
+
- ♻️ **Reset all** — clear the hidden list
|
|
13
|
+
- 🛡️ **Zero intrusion** — writes only the plugin's own hidden list, never your provider config; hiding a model a session already uses never interrupts that session
|
|
14
|
+
- 🆕 **New models visible by default** — the plugin remembers what to hide, not what to show
|
|
15
|
+
|
|
16
|
+
## Preview
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
## Requirements
|
|
21
|
+
|
|
22
|
+
- **DeepSeek Harness ≥ 0.2.0-rc.1** (0.2.0 rebuilt settings on volatile configuration and `configForms`; use plugin 0.1.2 on 0.1.x hosts)
|
|
23
|
+
- Node.js 22+
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
dsh plugin --profile web add dsh-model-visibility
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Restart `dsh web` to activate.
|
|
32
|
+
|
|
33
|
+
## How it works
|
|
34
|
+
|
|
35
|
+
- **Host half** (`lib/index.js`): declares the `hidden` field `.volatile()`, so a settings-form write commits the new value into the same stable reference through the Loader (no plugin restart), and wraps `ctx.llm.listModels` at its source — both the conversation selector and the settings page receive the filtered catalog. Catalog membership is advisory in the harness, so hiding a model a session already uses never breaks that session's dispatch.
|
|
36
|
+
- **Browser half** (`lib/client.js`): registers a `settings.section` page; durable state rides 0.2.0's shared `ctx.configForms` form, the catalog arrives through `ctx.remote.session.modelCatalog()` and refreshes on `llm/adapters-updated`, and page state is the union of the filtered catalog and the hidden entries, each hidden entry labeled by the display-name snapshot captured when it was hidden.
|
|
37
|
+
|
|
38
|
+
## Uninstall
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
dsh plugin --profile web remove dsh-model-visibility
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Uninstalling restores everything: the plugin never writes provider config, and the hidden list dies with the package.
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
MIT
|
package/README.md
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
# dsh-model-visibility
|
|
2
|
-
|
|
3
|
-
**[English](README.en.md) · 中文**
|
|
4
|
-
|
|
5
|
-
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的模型可见性插件:控制哪些模型出现在对话界面的模型选择菜单里。
|
|
6
|
-
|
|
7
|
-
安装后在设置左侧导航提供一个独立的「**模型可见性**」分区页(紧跟「模型」):
|
|
8
|
-
|
|
9
|
-
- 🔍 **搜索** —— 按模型名/ID/渠道名实时过滤
|
|
10
|
-
- 🎚️ **逐模型开关** —— 隐藏的模型立即从选择器消失,显示即恢复
|
|
11
|
-
- 📦 **渠道级批量** —— 一键隐藏/显示某个 Provider 的全部模型
|
|
12
|
-
- ♻️ **一键恢复全部** —— 清空隐藏列表
|
|
13
|
-
- 🛡️ **零侵入** —— 只写插件自己的隐藏列表,不改你的 Provider 配置;隐藏正在使用的模型不会中断该会话
|
|
14
|
-
- 🆕 **新模型自动可见** —— 插件只记录"要隐藏什么",Provider 新广告的模型默认出现
|
|
15
|
-
|
|
16
|
-
## 预览
|
|
17
|
-
|
|
18
|
-

|
|
19
|
-
|
|
20
|
-
## 要求
|
|
21
|
-
|
|
22
|
-
- DeepSeek Harness ≥ 0.
|
|
23
|
-
- Node.js 22+(构建与运行)
|
|
24
|
-
|
|
25
|
-
## 安装
|
|
26
|
-
|
|
27
|
-
```sh
|
|
28
|
-
dsh plugin --profile web add dsh-model-visibility
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
重启 `dsh web` 后生效。
|
|
32
|
-
|
|
33
|
-
## 工作原理
|
|
34
|
-
|
|
35
|
-
- **宿主半**(`lib/index.js
|
|
36
|
-
- **浏览器半**(`lib/client.js`):向设置壳注册一个 `settings.section`
|
|
37
|
-
|
|
38
|
-
## 卸载
|
|
39
|
-
|
|
40
|
-
```sh
|
|
41
|
-
dsh plugin --profile web remove dsh-model-visibility
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
卸载即恢复原状:插件不写入 Provider 配置,隐藏列表随包删除自动失效。
|
|
45
|
-
|
|
46
|
-
## License
|
|
47
|
-
|
|
48
|
-
MIT
|
|
1
|
+
# dsh-model-visibility
|
|
2
|
+
|
|
3
|
+
**[English](README.en.md) · 中文**
|
|
4
|
+
|
|
5
|
+
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的模型可见性插件:控制哪些模型出现在对话界面的模型选择菜单里。
|
|
6
|
+
|
|
7
|
+
安装后在设置左侧导航提供一个独立的「**模型可见性**」分区页(紧跟「模型」):
|
|
8
|
+
|
|
9
|
+
- 🔍 **搜索** —— 按模型名/ID/渠道名实时过滤
|
|
10
|
+
- 🎚️ **逐模型开关** —— 隐藏的模型立即从选择器消失,显示即恢复
|
|
11
|
+
- 📦 **渠道级批量** —— 一键隐藏/显示某个 Provider 的全部模型
|
|
12
|
+
- ♻️ **一键恢复全部** —— 清空隐藏列表
|
|
13
|
+
- 🛡️ **零侵入** —— 只写插件自己的隐藏列表,不改你的 Provider 配置;隐藏正在使用的模型不会中断该会话
|
|
14
|
+
- 🆕 **新模型自动可见** —— 插件只记录"要隐藏什么",Provider 新广告的模型默认出现
|
|
15
|
+
|
|
16
|
+
## 预览
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
## 要求
|
|
21
|
+
|
|
22
|
+
- **DeepSeek Harness ≥ 0.2.0-rc.1**(0.2.0 以 volatile 配置与 `configForms` 重构了设置体系;0.1.x 宿主请使用本插件 0.1.2)
|
|
23
|
+
- Node.js 22+(构建与运行)
|
|
24
|
+
|
|
25
|
+
## 安装
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
dsh plugin --profile web add dsh-model-visibility
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
重启 `dsh web` 后生效。
|
|
32
|
+
|
|
33
|
+
## 工作原理
|
|
34
|
+
|
|
35
|
+
- **宿主半**(`lib/index.js`):`hidden` 字段声明为 `.volatile()`,设置表单写入时由 Loader 把新值原地提交进同一稳定引用(插件不重启),并在源头包装 `ctx.llm.listModels`——会话选择器与设置页拿到的目录都是过滤后的。目录成员资格在 harness 中是"建议性"的,因此隐藏一个正在使用的模型不影响其调度。
|
|
36
|
+
- **浏览器半**(`lib/client.js`):向设置壳注册一个 `settings.section` 分区页;持久状态经 0.2.0 的 `ctx.configForms` 共享表单读写,目录经 `ctx.remote.session.modelCatalog()` 读取并跟随 `llm/adapters-updated` 失效刷新;页面状态来自"过滤后目录 ∪ 隐藏条目"的并集,隐藏条目携带隐藏时抓取的显示名快照。
|
|
37
|
+
|
|
38
|
+
## 卸载
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
dsh plugin --profile web remove dsh-model-visibility
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
卸载即恢复原状:插件不写入 Provider 配置,隐藏列表随包删除自动失效。
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
MIT
|