dsh-wdx-relief 0.5.2 → 0.7.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/CHANGELOG.md +18 -0
- package/README.md +24 -22
- package/README.zh.md +56 -0
- package/client/client.js +183 -246
- package/cordis.patch.yml +4 -3
- package/docs/DETAIL.md +56 -0
- package/docs/DETAIL.zh.md +56 -0
- package/docs/guide.md +62 -31
- package/index.js +57 -33
- package/locale/en.json +2 -1
- package/locale/zh.json +2 -1
- package/package.json +2 -1
- package/src/recap.js +3 -1
- package/src/style.js +8 -1
- package/src/toolCallDetect.js +1294 -0
- package/src/toolCallRepair.js +560 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.0 — 2026-11-18
|
|
4
|
+
|
|
5
|
+
- 新增 **ELI5 模式**(默认开启):设置页「回复方式」分组里一个开关,打开时向 system prompt 注入「默认用 ELI5 的方式和我说话,如果我要求则深入讲解」,关掉后这句完全不出现。
|
|
6
|
+
- 新字段 `eli5`(默认 `true`,volatile),与长度、便于行动、回复风格互相独立。
|
|
7
|
+
- `buildStylePrompt` 的顺序:长度 → 便于行动 → ELI5 → 风格 → 自定义指令。
|
|
8
|
+
- 设置页瘦身:可见控件从 6 组 21 项收到 4 组(功能 / 输入框上的一行 / 回复方式 / 工具调用守卫)+ 高级折叠,顶层只剩 10 项。
|
|
9
|
+
- 删掉 `recapTiming`(状态耗时)、`recapReasoning`(思考预览)、`recapPlacement`(显示位置)、`recapMinTurns`、`recapCooldownTurns`、`recapSimilarityThreshold`、`recapMaxWords`:行为固定为原先的默认(一行固定在输入框上方、每轮更新、阈值 0.9、词预算 40),旧 profile 里的旧值不再生效。
|
|
10
|
+
- `recapModelChain` 与工具守卫的语言 / 每轮上限 / 诊断日志收进「高级」折叠;「自定义指令」并入「回复方式」组,「待跟进」与预测同放「功能」组。
|
|
11
|
+
- 「便于行动」删掉与 ELI5 重复的「术语先用白话说明」,解释深度交给 ELI5 开关。
|
|
12
|
+
- 输入框上方的一行不再注册 `conversation.composer.dock`,只保留上方位置。
|
|
13
|
+
|
|
14
|
+
## 0.6.0 — 2026-11-17
|
|
15
|
+
|
|
16
|
+
- 新增 **工具调用泄漏守卫**(默认开启):模型把工具调用直接写成正文(strata serve 常见的 `<tool_call>` / `<function=NAME>` / `<parameter=NAME>`,以及 `<invoke>` / `antml:` 信封)、这一步没有任何工具卡、turn 却像「已完成」一样结束时,当场检测并在同一轮内注入纠正让模型用小块重发。
|
|
17
|
+
- 移植自 `@irwdone/dsh-tool-call-leak-fix`(MIT),并按本插件的 volatile Config 改造:配置改动即时生效;新增 `toolRepair` / `toolRepairLang` / `toolRepairMaxCorrections`(默认 2)/ `toolRepairDebugLog` 四个字段,设置页同步新增「工具调用守卫」分组(开关、语言、每轮上限、诊断日志)。
|
|
18
|
+
- 五个机制:分发前拒绝结构损坏或参数被清空的大调用;写入类工具自报空转时补提示;静默失败同轮自愈(第一次讲原因、第二次更硬更短,到上限即停);fork 会话首步简报;损坏步骤在模型可见 surface 上遮蔽(先自检 replace 语义,零模型调用)。
|
|
19
|
+
- Host 新增依赖 `tools` 服务;`node --test` 127 项通过(新增检测核心与宿主接线两组用例)。
|
|
20
|
+
|
|
3
21
|
## 0.5.2 — 2026-11-14
|
|
4
22
|
|
|
5
23
|
- 修掉「预测看不到提问框」:输入框灰字预测的上下文里现在会带上 `ask_user_question` 的问答,
|
package/README.md
CHANGED
|
@@ -1,54 +1,56 @@
|
|
|
1
1
|
# WDX Relief
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A small collection of features that reduce the everyday mental load of using DSH. Seven features today, and **every setting lives in this plugin's own configuration**.
|
|
4
4
|
|
|
5
|
-
>
|
|
6
|
-
>
|
|
5
|
+
> Sidebar **Plugins → Installed plugins → WDX Relief**; the configuration area is below the bundle page.
|
|
6
|
+
> It does not add a page to DSH's Settings navigation; every field is the plugin's own `Config`, persisted to the profile's `cordis.patch.yml` after saving.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Features
|
|
9
9
|
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- **WDX Relief
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
10
|
+
- **Next-message prediction**: after a turn, grey text guesses what you'll send next; press <kbd>Tab</kbd> to accept. Typing hides it, <kbd>Esc</kbd> dismisses it.
|
|
11
|
+
- **The line above the input** (on by default): shows turn by turn "what this turn is doing and where it is", always above the composer. By default it shows the semantic recap (one cheap model call per turn); the local activity feed makes zero model calls and can be enabled in settings. This line never enters the model context. Generated recaps stay in the WDX Relief panel on the right.
|
|
12
|
+
- **WDX Relief page** (right sidebar, on by default): appears in the right sidebar's tool list just like WDX Git. It has three tabs: "Follow-ups" (default) lists things past sessions reminded you about that you haven't handled; click an item to jump back to that session, and the "×" on each clears unwanted suggestions (undoable; cleared records stay local). "Session review" looks back at every recap line generated in this session. "Ask aside" stays out of the main context.
|
|
13
|
+
- **Ask aside**: the tab's input is a rounded card like the composer, with a model picker for the aside at the bottom (only the model icon when narrow) and a circular send button on the right. The Q&A stays in the panel: it is not written to the session or the command log, does not enter the model context, and does not change the main session's model.
|
|
14
|
+
- **Reply style**: length **short / standard / detailed**; style **default / professional / friendly / blunt / follow my style**; up to 2000 characters of custom instructions.
|
|
15
|
+
- **Action-first** (on by default): result and next step first; one sentence when one suffices; keeps risks, failure conditions, and work you've already authorized.
|
|
16
|
+
- **ELI5 mode** (on by default): injects one line, "talk to me like I'm 5 by default; go deeper when I ask"; turning it off removes that line entirely.
|
|
17
|
+
- **Tool-call leak guard** (on by default): when the model writes a tool call as literal text (`<tool_call>` / `<invoke>` envelope), the step produces no tool card, yet the turn closes normally, the guard detects it on the spot and injects a correction in the same turn so the model reissues the call. The damaged step is also voided on the model-visible surface, and a forked session gets a one-time brief telling it not to imitate broken history. Derived from `@irwdone/dsh-tool-call-leak-fix` (MIT). It can be switched on/off and tuned under "Tool-call guard" in the plugin settings.
|
|
16
18
|
|
|
17
|
-
##
|
|
19
|
+
## Requirements
|
|
18
20
|
|
|
19
|
-
- DSH Web profile
|
|
20
|
-
-
|
|
21
|
-
-
|
|
21
|
+
- DSH Web profile; the plugin depends on the `connection`, `sessions`, and `tools` services.
|
|
22
|
+
- A default model configured. Prediction sends the last few turns to the current default model as a prompt; Ask aside uses the current session model by default and can be switched to another model at the bottom of the panel; Follow-ups sends one tail fragment from recent sessions for a merge decision. None of the three writes to the session log or triggers the agent loop.
|
|
23
|
+
- The semantic recap starts after 3 user turns and updates every turn: it tries your configured cheap-model chain first, then picks a cheap model automatically, then falls back to the current default model; on model failure it falls back to a local short concatenation. The activity feed makes no model calls.
|
|
22
24
|
|
|
23
|
-
##
|
|
25
|
+
## Install
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
In the DSH sidebar, go to **Plugins → Add plugin** and enter:
|
|
26
28
|
|
|
27
29
|
```text
|
|
28
30
|
dsh-wdx-relief
|
|
29
31
|
```
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
Or have the agent call:
|
|
32
34
|
|
|
33
35
|
```text
|
|
34
36
|
plugin_manager install_bundle target = "dsh-wdx-relief"
|
|
35
37
|
```
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
Or from the command line:
|
|
38
40
|
|
|
39
41
|
```bash
|
|
40
42
|
dsh plugin --profile <profile> add dsh-wdx-relief
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
Enable it after installing; the client module mounts on the next page load.
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
For local development with a `link:` install of the current directory, see [docs/guide.md](docs/guide.md).
|
|
46
48
|
|
|
47
|
-
##
|
|
49
|
+
## Development
|
|
48
50
|
|
|
49
51
|
```bash
|
|
50
52
|
pnpm install
|
|
51
53
|
pnpm test
|
|
52
54
|
```
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
For the full config fields, implementation details, standalone web-profile install, and on-device verification records, see [docs/guide.md](docs/guide.md).
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# WDX Relief
|
|
2
|
+
|
|
3
|
+
降低 DSH 日常使用心智负担的小功能集合。目前七个功能,**全部设置都在这个插件的配置里**。
|
|
4
|
+
|
|
5
|
+
> 侧边栏 **插件 → 已安装插件 → WDX Relief**,配置区在 bundle 页面下方。
|
|
6
|
+
> 不往 DSH 的 Settings 导航里插入页面;字段都是插件自己的 `Config`,写入后持久化到 profile 的 `cordis.patch.yml`。
|
|
7
|
+
|
|
8
|
+
## 功能
|
|
9
|
+
|
|
10
|
+
- **输入框下一句预测**:对话结束后用灰字猜你接下来要发的话,<kbd>Tab</kbd> 填入;打字隐藏,<kbd>Esc</kbd> 忽略。
|
|
11
|
+
- **输入框上的一行**(默认开启):逐轮显示「这一轮在做什么、到哪了」,固定放在输入框上方。默认显示语义摘要(每轮用一次便宜模型);活动流水本地生成、零模型调用,可在设置里打开。这一行永不进入模型上下文,生成过的摘要会留在右侧 WDX Relief 面板里。
|
|
12
|
+
- **WDX Relief 页面**(右侧栏,默认开启):和 WDX Git 一样出现在右侧栏的工具列表里。页面用三个 Tab:默认是「待跟进」,把过去会话里提醒过你、但你还没处理的事列成清单,点条目跳回原会话,每条的「×」可以清掉不想要的建议(可撤销,清掉记录只存在本地);「会话回顾」回看这个会话生成过的每一行摘要;「旁问」不进入主上下文。
|
|
13
|
+
- **旁问**:Tab 里的输入框和 composer 一样是圆角卡片,底部可以选旁问专用模型(窄的时候只显示模型图标)、右侧圆形按钮发送;问答只留在面板里,不写会话、不写命令日志,也不进入模型上下文,不改变主会话模型。
|
|
14
|
+
- **回复风格**:长度 **短 / 标准 / 详细**;风格 **默认 / 专业 / 亲和 / 直接 / 跟随我的风格**;可加最多 2000 字的自定义指令。
|
|
15
|
+
- **便于行动**(默认开启):先给结果和下一步;能一句说清的不写一段;保留风险、失败条件和已授权该做的工作。
|
|
16
|
+
- **ELI5 模式**(默认开启):注入一句「默认用 ELI5 的方式和我说话,如果我要求则深入讲解」;关掉后这句完全不出现。
|
|
17
|
+
- **工具调用泄漏守卫**(默认开启):模型把工具调用直接写成正文(`<tool_call>` / `<invoke>` 信封)、这一步没有任何工具卡、turn 却正常结束时,当场检测并在同一轮内注入纠正让模型重发;损坏的那一步还会在模型可见面上被作废,fork 出去的会话首步会收到一份「历史里的坏样本不要模仿」简报。可在设置页「工具调用守卫」分组里开关、改提示语言和每轮上限。源自 `@irwdone/dsh-tool-call-leak-fix`(MIT)。
|
|
18
|
+
|
|
19
|
+
## 运行要求
|
|
20
|
+
|
|
21
|
+
- DSH Web profile;插件依赖 `connection`、`sessions` 与 `tools` 服务。
|
|
22
|
+
- 已配置默认模型。预测会把最近几轮对话作为 prompt 发给当前默认模型;旁问默认用当前会话模型,也可以在面板底部切到别的模型;「待跟进」会把近期会话的尾部片段发一次,做归并判断。三者都不写入会话日志、不触发 agent loop。
|
|
23
|
+
- 语义摘要从第 3 轮用户消息后开始、每轮更新,先按你配置的便宜模型链尝试,再自动挑便宜模型,最后退回当前默认模型;模型失败时退回本地短拼接。活动流水不调用模型。
|
|
24
|
+
|
|
25
|
+
## 安装
|
|
26
|
+
|
|
27
|
+
在 DSH 侧边栏 **插件 → 添加插件** 输入:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
dsh-wdx-relief
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
或让 agent 调:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
plugin_manager install_bundle target = "dsh-wdx-relief"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
或命令行:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
dsh plugin --profile <profile> add dsh-wdx-relief
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
安装后启用;客户端模块会在下次页面加载时挂载。
|
|
46
|
+
|
|
47
|
+
本地开发时用 `link:` 安装当前目录的方式见 [docs/guide.md](docs/guide.md)。
|
|
48
|
+
|
|
49
|
+
## 开发
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pnpm install
|
|
53
|
+
pnpm test
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
完整的配置字段、实现细节、独立 web profile 安装方式和实机验证记录见 [docs/guide.md](docs/guide.md)。
|