@huai_xin/dsh-model-picker 0.0.0-stage → 0.1.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 huai_xin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,53 @@
1
- # Temporary Holding Version
1
+ # dsh-model-picker
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 给 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)的输入框换一个**模型选择器**:可搜索、按 provider 分组,模型和思考档位分成两个独立控件。
4
+
5
+ DSH 自带的模型选择器是按两级菜单设计的。模型一多,找一个模型要翻两层;思考档位藏在二级菜单里,改一次要点三次。这个插件把它换成一次点开的列表:直接搜、直接选。
6
+
7
+ ## 它做了什么
8
+
9
+ **可搜索的模型列表** — 点开即输入,按名字或 id 过滤,按 provider 分组显示。
10
+
11
+ **模型与思考档位分开** — 两个按钮、两个浮层,互不干扰。换模型不会顺手改掉档位,改档位也不会换模型。
12
+
13
+ **和官方选择器共用一份状态** — 不是另起炉灶。它复用 DSH 自己的 `modelDirectories` 服务,所以你在输入框里选的模型,和 `/model` 命令弹窗里看到的,永远是同一个。切换过程中(Host 还没确认时)两个入口都会显示"正在切换"。
14
+
15
+ **跟着模型列表实时变** — 别的插件改了可用模型(开关模型、导入账号、探测到模型不可用……),这个列表会立刻跟着变,不用刷新页面。
16
+
17
+ **新会话显示默认模型** — 而不是空着或显示"没有可用模型"。
18
+
19
+ **子会话里自动隐藏** — 在被指派的 subagent 会话里,Host 不允许换模型,控件直接不渲染,而不是给你一个点了必失败的按钮。
20
+
21
+ ## 安装
22
+
23
+ ```sh
24
+ dsh plugin --profile <你的 profile> add @huai_xin/dsh-model-picker
25
+ ```
26
+
27
+ 装完**重启宿主**,再刷新页面。客户端代码是在页面启动时加载的,只刷新页面通常还是旧的。
28
+
29
+ 也可以从本地目录装:
30
+
31
+ ```sh
32
+ dsh plugin --profile <你的 profile> add /path/to/dsh-model-picker
33
+ ```
34
+
35
+ 不想要了就直接停用或移除这个 bundle,不会影响模型本身是否可用。
36
+
37
+ ## 已知限制
38
+
39
+ **会丢掉 provider 插件挂在模型名上的装饰。** DSH 官方选择器声明了一个子槽位 `conversation.input.model.label`,provider 插件往那里挂徽标、可用性提示、促销标记之类的东西。替换者没法继承这个声明——子槽位只能声明一次,官方占用者即使被压住不渲染,它的声明依然有效。所以在这个选择器里,模型名后面不会有那些装饰。
40
+
41
+ 想同时要装饰和这套交互,只能停用官方的 `ui-model-selection` bundle,代价是它的 `/model` 命令一起消失。这是 DSH 槽位架构的限制,不是本插件能绕过的。
42
+
43
+ ## 兼容性
44
+
45
+ 需要 DSH `0.2.1-rc` 及以上。模型数据全部走 DSH 自己的 client remote(`session.modelCatalog` / `session.selectModel`),插件本身不认识任何具体 provider——任何 provider 插件注册的模型都会出现在列表里。
46
+
47
+ ## 开发
48
+
49
+ 见 [AGENTS.md](AGENTS.md)。
50
+
51
+ ## License
52
+
53
+ MIT