@megen-lebar/dsh-reasoning-effort 0.2.4 → 0.2.5
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.i18n.yaml +3 -0
- package/README.md +57 -26
- package/README.zh.md +74 -0
- package/package.json +4 -3
package/README.i18n.yaml
ADDED
package/README.md
CHANGED
|
@@ -1,43 +1,74 @@
|
|
|
1
1
|
# @megen-lebar/dsh-reasoning-effort
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Visual reasoning-effort configuration for the DSH Web GUI. It adds a sidebar entry for managing reasoning levels for models served by third-party APIs without hand-editing YAML.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Standalone repository: <https://github.com/Jamsharden/dsh-reasoning-effort>
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- 选定模型后自动带出该模型的**官方思考档位**。插件优先读取当前 DSH 运行时的 pi-ai 目录,内置快照只作离线兜底,因此 Moonshot/Kimi 等官方模型会随运行时同步。
|
|
11
|
-
- 对官方 provider 可直接浏览完整模型目录;对自定义 provider 采用 provider + 模型 ID 匹配,避免同名模型串档。
|
|
12
|
-
- 两级交互流程:先选 Provider 与模型,再编辑思考档位;支持搜索、同步官方档位、全部关闭和恢复当前配置。
|
|
13
|
-
- 可为每档勾选启用并自定义「线上拼写」,并设置 provider 级默认思考强度、`compat.thinkingFormat` 与 `supportsReasoningEffort`。
|
|
14
|
-
- 模型级「关闭推理」开关:保存 `reasoningEfforts: false` 后,DSH 不再把该模型视为可配置推理模型;当前对话的推理等级入口会同步隐藏,不会改动同一 Provider 的默认强度或协议设置。
|
|
15
|
-
- 面板会显示当前对话的 Provider / 模型并高亮对应条目,避免在同名模型的其他 Provider 上误改配置。
|
|
16
|
-
- 保存过程有明确的进行中、成功和错误反馈;写入 DSH settings 命名空间 `llm-pi-ai` 后,下一轮对话生效,无需重启。
|
|
9
|
+
## What it does
|
|
17
10
|
|
|
18
|
-
|
|
11
|
+
- Lists the providers and models configured under `llm-pi-ai.providers.*` in `settings.yaml`.
|
|
12
|
+
- Shows each model's official reasoning levels. The plugin prefers the pi-ai catalog from the running DSH installation and uses its bundled snapshot as an offline fallback, so official models such as Moonshot and Kimi follow the runtime catalog.
|
|
13
|
+
- Browses the full catalog for official providers and matches custom providers by provider plus model ID to avoid mixing same-named models.
|
|
14
|
+
- Provides a two-stage flow: choose a provider and model, then edit reasoning levels. It supports search, catalog synchronization, disabling all levels, and restoring the current configuration.
|
|
15
|
+
- Enables each level independently, accepts a custom wire spelling, and configures the provider default, `compat.thinkingFormat`, and `supportsReasoningEffort`.
|
|
16
|
+
- Provides a model-level disable-reasoning switch. Saving `reasoningEfforts: false` makes DSH treat that model as non-configurable for reasoning; the reasoning-level entry for the current conversation is hidden without changing the provider default or protocol settings.
|
|
17
|
+
- Shows the provider and model of the current conversation and highlights the matching row, preventing accidental edits to a same-named model under another provider.
|
|
18
|
+
- Reports save progress, success, and errors. Changes are written to the DSH settings namespace `llm-pi-ai` and take effect on the next conversation without a restart.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
### npm (recommended)
|
|
19
23
|
|
|
20
24
|
```powershell
|
|
21
25
|
dsh plugin --profile web add @megen-lebar/dsh-reasoning-effort
|
|
22
26
|
```
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
Fully exit and restart the DSH Web Host after installation, then refresh the GUI. The local link method below can be used when developing from source.
|
|
29
|
+
|
|
30
|
+
### Local link
|
|
31
|
+
|
|
32
|
+
1. Add `"@megen-lebar/dsh-reasoning-effort": "link:<absolute-package-path>"` to `dependencies` in `~/.dsh/profiles/web/package.json`, and add `"@megen-lebar/dsh-reasoning-effort"` to `dsh.profile.bundles`.
|
|
33
|
+
2. Restart `dsh web`.
|
|
34
|
+
3. Open `http://127.0.0.1:45723`; the sidebar will contain the Reasoning Effort entry.
|
|
35
|
+
|
|
36
|
+
## Configuration
|
|
37
|
+
|
|
38
|
+
- Configure API keys, base URLs, and model lists in the official DSH Models page. This plugin only edits reasoning-related fields.
|
|
39
|
+
- Official levels come from the pi-ai catalog installed with DSH when available; the bundled snapshot is used automatically when the runtime catalog cannot be resolved. Custom levels remain available in either case.
|
|
40
|
+
- The plugin and the host Models page share the `llm-pi-ai` settings namespace. Writes use `settings.mutate` with the current revision so concurrent changes are not silently overwritten.
|
|
41
|
+
|
|
42
|
+
## Compatibility
|
|
43
|
+
|
|
44
|
+
- Runtime requirement: DSH `>=0.1.1-rc.2`, declared as `dsh.engines.dsh` in `package.json`.
|
|
45
|
+
- Verified environments: DSH CLI `0.1.1-rc.2` with the `0.1.2-alpha.1` cohort store. The plugin runs normally in both parts of this setup.
|
|
46
|
+
|
|
47
|
+
## Uninstall and retained settings
|
|
48
|
+
|
|
49
|
+
Uninstalling the plugin removes its bundle and UI, but does not automatically delete the reasoning settings already written to the shared `llm-pi-ai` namespace. The following fields may remain:
|
|
50
|
+
|
|
51
|
+
- `providers.<provider>.models[].reasoningEfforts`
|
|
52
|
+
- `providers.<provider>.modelOverrides.<model>.reasoningEfforts`
|
|
53
|
+
- `providers.<provider>.reasoning`
|
|
54
|
+
- `providers.<provider>.compat.thinkingFormat`
|
|
55
|
+
- `providers.<provider>.compat.supportsReasoningEffort`
|
|
56
|
+
|
|
57
|
+
To clean up, remove the corresponding fields from the `llm-pi-ai` settings and restart the DSH Web Host. Keeping these fields is intentional so uninstalling the UI does not discard host model configuration; the plugin does not perform automatic cleanup.
|
|
25
58
|
|
|
26
|
-
##
|
|
59
|
+
## Source and version provenance
|
|
27
60
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
2. 重启 `dsh web`。
|
|
32
|
-
3. 打开 `http://127.0.0.1:45723`,侧边栏出现「思考强度」入口。
|
|
61
|
+
- The source for npm `0.2.0` is `Jamsharden/dsh-plugins` commit [`ddd1ed2f`](https://github.com/Jamsharden/dsh-plugins/commit/ddd1ed2f636a4fc1c4a29544d90b268eef1ceeab).
|
|
62
|
+
- The source for npm `0.2.3` is `Jamsharden/dsh-plugins` commit [`8137d40b`](https://github.com/Jamsharden/dsh-plugins/commit/8137d40b952949ade8d36792498d7afc51edf839), tagged [`dsh-reasoning-effort-v0.2.3`](https://github.com/Jamsharden/dsh-plugins/releases/tag/dsh-reasoning-effort-v0.2.3).
|
|
63
|
+
- Version `0.2.5` is prepared in this standalone repository: <https://github.com/Jamsharden/dsh-reasoning-effort>.
|
|
33
64
|
|
|
34
|
-
##
|
|
65
|
+
## Known limitations
|
|
35
66
|
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
- `cordis.patch.yml` — bundle patch:把插件 row 注入 web profile roster。
|
|
67
|
+
- The plugin only configures reasoning behavior; API credentials, base URLs, and model lists remain managed by the official Models page.
|
|
68
|
+
- Runtime catalog discovery depends on the installed pi-ai package. When it is unavailable, the bundled catalog is used and may not contain newly added official models.
|
|
39
69
|
|
|
40
|
-
##
|
|
70
|
+
## Package layout
|
|
41
71
|
|
|
42
|
-
-
|
|
43
|
-
-
|
|
72
|
+
- `lib/index.js` — host half: `/api/dsh-reasoning/*` routes, `llm-pi-ai` settings access, and official-level catalog lookup.
|
|
73
|
+
- `lib/client.js` — browser half: sidebar entry and visual panel implemented with DOM APIs.
|
|
74
|
+
- `cordis.patch.yml` — bundle patch that injects the plugin row into the web profile roster.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# @megen-lebar/dsh-reasoning-effort
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
DSH Web GUI 的可视化 reasoning effort 配置器。在侧边栏增加「思考强度」入口,用于管理第三方 API 模型的思考档位,无需手动编辑 YAML。
|
|
6
|
+
|
|
7
|
+
独立仓库:<https://github.com/Jamsharden/dsh-reasoning-effort>
|
|
8
|
+
|
|
9
|
+
## 功能
|
|
10
|
+
|
|
11
|
+
- 列出 `settings.yaml` 中 `llm-pi-ai.providers.*` 配置的 provider 与模型。
|
|
12
|
+
- 显示每个模型的官方思考档位。插件优先读取当前 DSH 安装中的 pi-ai 目录,并以内置快照作为离线兜底,因此 Moonshot、Kimi 等官方模型会跟随运行时目录。
|
|
13
|
+
- 对官方 provider 浏览完整目录;对自定义 provider 按 provider 与模型 ID 匹配,避免混淆不同 provider 下的同名模型。
|
|
14
|
+
- 提供两级流程:先选择 provider 和模型,再编辑思考档位;支持搜索、同步目录、关闭全部档位,以及恢复当前配置。
|
|
15
|
+
- 支持逐档启用、自定义线上拼写,并配置 provider 默认值、`compat.thinkingFormat` 与 `supportsReasoningEffort`。
|
|
16
|
+
- 提供模型级「关闭推理」开关。保存 `reasoningEfforts: false` 后,DSH 会将该模型视为不可配置推理模型;当前对话的思考等级入口会隐藏,但不会改变 provider 默认值或协议设置。
|
|
17
|
+
- 显示当前对话的 provider 与模型并高亮匹配行,避免误改其他 provider 下的同名模型。
|
|
18
|
+
- 提供保存中、成功和错误状态反馈。变更写入 DSH settings 的 `llm-pi-ai` 命名空间,并在下一轮对话生效,无需重启。
|
|
19
|
+
|
|
20
|
+
## 安装
|
|
21
|
+
|
|
22
|
+
### npm(推荐)
|
|
23
|
+
|
|
24
|
+
```powershell
|
|
25
|
+
dsh plugin --profile web add @megen-lebar/dsh-reasoning-effort
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
安装后完全退出并重启 DSH Web Host,再刷新 GUI。开发源码时可以使用下面的本地 link 方式。
|
|
29
|
+
|
|
30
|
+
### 本地 link
|
|
31
|
+
|
|
32
|
+
1. 在 `~/.dsh/profiles/web/package.json` 的 `dependencies` 中加入 `"@megen-lebar/dsh-reasoning-effort": "link:<包的绝对路径>"`,并在 `dsh.profile.bundles` 中加入 `"@megen-lebar/dsh-reasoning-effort"`。
|
|
33
|
+
2. 重启 `dsh web`。
|
|
34
|
+
3. 打开 `http://127.0.0.1:45723`,侧边栏会出现「思考强度」入口。
|
|
35
|
+
|
|
36
|
+
## 配置
|
|
37
|
+
|
|
38
|
+
- 在 DSH 官方 Models 页面配置 API key、base URL 与模型列表。本插件只编辑思考相关字段。
|
|
39
|
+
- 如果可以访问,官方档位来自 DSH 安装中的 pi-ai 目录;无法解析运行时目录时自动使用内置快照。无论目录是否可用,都可以继续使用自定义档位。
|
|
40
|
+
- 本插件与宿主 Models 页面共享 `llm-pi-ai` settings 命名空间。写入使用带当前 revision 的 `settings.mutate`,避免静默覆盖并发修改。
|
|
41
|
+
|
|
42
|
+
## 兼容性
|
|
43
|
+
|
|
44
|
+
- 运行时要求:DSH `>=0.1.1-rc.2`,已在 `package.json` 的 `dsh.engines.dsh` 中声明。
|
|
45
|
+
- 已验证环境:DSH CLI `0.1.1-rc.2` 与 `0.1.2-alpha.1` cohort store。该组合下插件两部分均可正常运行。
|
|
46
|
+
|
|
47
|
+
## 卸载与配置保留
|
|
48
|
+
|
|
49
|
+
卸载插件会移除其 bundle 和界面,但不会自动删除已经写入共享 `llm-pi-ai` 命名空间的思考配置。以下字段可能会保留:
|
|
50
|
+
|
|
51
|
+
- `providers.<provider>.models[].reasoningEfforts`
|
|
52
|
+
- `providers.<provider>.modelOverrides.<model>.reasoningEfforts`
|
|
53
|
+
- `providers.<provider>.reasoning`
|
|
54
|
+
- `providers.<provider>.compat.thinkingFormat`
|
|
55
|
+
- `providers.<provider>.compat.supportsReasoningEffort`
|
|
56
|
+
|
|
57
|
+
如需清理,请从 `llm-pi-ai` settings 中删除对应字段,然后重启 DSH Web Host。保留这些字段是有意设计,确保卸载界面不会丢失宿主模型配置;插件不会自动清理。
|
|
58
|
+
|
|
59
|
+
## 来源与版本出处
|
|
60
|
+
|
|
61
|
+
- npm `0.2.0` 的源码来自 `Jamsharden/dsh-plugins` 提交 [`ddd1ed2f`](https://github.com/Jamsharden/dsh-plugins/commit/ddd1ed2f636a4fc1c4a29544d90b268eef1ceeab)。
|
|
62
|
+
- npm `0.2.3` 的源码来自 `Jamsharden/dsh-plugins` 提交 [`8137d40b`](https://github.com/Jamsharden/dsh-plugins/commit/8137d40b952949ade8d36792498d7afc51edf839),对应标签 [`dsh-reasoning-effort-v0.2.3`](https://github.com/Jamsharden/dsh-plugins/releases/tag/dsh-reasoning-effort-v0.2.3)。
|
|
63
|
+
- `0.2.5` 版本在本独立仓库准备发布:<https://github.com/Jamsharden/dsh-reasoning-effort>。
|
|
64
|
+
|
|
65
|
+
## 已知限制
|
|
66
|
+
|
|
67
|
+
- 本插件只配置思考行为;API 凭据、base URL 与模型列表仍由 DSH 官方 Models 页面管理。
|
|
68
|
+
- 运行时目录发现依赖已安装的 pi-ai 包。运行时目录不可用时会使用内置目录,其中可能不包含新增加的官方模型。
|
|
69
|
+
|
|
70
|
+
## 包结构
|
|
71
|
+
|
|
72
|
+
- `lib/index.js` — host 半区:`/api/dsh-reasoning/*` 路由、`llm-pi-ai` settings 访问与官方档位查询。
|
|
73
|
+
- `lib/client.js` — 浏览器半区:侧边栏入口与基于 DOM API 实现的可视化面板。
|
|
74
|
+
- `cordis.patch.yml` — bundle patch,将插件行注入 web profile roster。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@megen-lebar/dsh-reasoning-effort",
|
|
3
3
|
"description": "DSH Web GUI 思考强度配置器:侧边栏新增「思考强度」入口,可视化管理第三方 API 各模型的 reasoning effort(自动带出官方档位、保留 off、自定义线上拼写),一键写回 settings 的 llm-pi-ai 命名空间,无需手写 YAML。",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": { "node": "^22.19.0 || >=24.0.0" },
|
|
7
7
|
"main": "lib/index.js",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"./package.json": "./package.json"
|
|
12
12
|
},
|
|
13
13
|
"dsh": {
|
|
14
|
+
"engines": { "dsh": ">=0.1.1-rc.2" },
|
|
14
15
|
"bundle": { "patch": "./cordis.patch.yml" },
|
|
15
16
|
"client": { "inject": ["@deepseek-ai/dsh-client-locale", "@deepseek-ai/dsh-cordis-client-runner", "@deepseek-ai/dsh-client-ui-model-selection"], "platform": "web" }
|
|
16
17
|
},
|
|
@@ -20,11 +21,11 @@
|
|
|
20
21
|
"test": "node --test",
|
|
21
22
|
"check": "node --check lib/index.js && node --check lib/client.js"
|
|
22
23
|
},
|
|
23
|
-
"files": ["lib", "test", "cordis.patch.yml", "README.md"],
|
|
24
|
+
"files": ["lib", "test", "cordis.patch.yml", "README.md", "README.zh.md", "README.i18n.yaml"],
|
|
24
25
|
"publishConfig": { "access": "public" },
|
|
25
26
|
"repository": { "type": "git", "url": "git+https://github.com/Jamsharden/dsh-reasoning-effort.git" },
|
|
26
27
|
"bugs": { "url": "https://github.com/Jamsharden/dsh-reasoning-effort/issues" },
|
|
27
28
|
"homepage": "https://github.com/Jamsharden/dsh-reasoning-effort",
|
|
28
29
|
"keywords": ["dsh", "deepseek-harness", "reasoning-effort", "web-plugin"],
|
|
29
30
|
"license": "Apache-2.0"
|
|
30
|
-
}
|
|
31
|
+
}
|