dsh-client-auto-continue 0.12.1 → 0.13.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.md +26 -10
- package/README.zh.md +26 -10
- package/docs/screenshots/01-settings-section.png +0 -0
- package/docs/screenshots/01-settings-section.zh.png +0 -0
- package/docs/screenshots/02-settings-card.png +0 -0
- package/docs/screenshots/02-settings-card.zh.png +0 -0
- package/docs/screenshots/07-card-panels.png +0 -0
- package/docs/screenshots/07-card-panels.zh.png +0 -0
- package/docs/screenshots/08-composer-toggle.png +0 -0
- package/docs/screenshots/08-composer-toggle.zh.png +0 -0
- package/docs/screenshots/README.md +17 -12
- package/lib/client.js +322 -151
- package/lib/client.js.map +4 -4
- package/lib/index.js +32 -6
- package/lib/types/client/composer-toggle.d.ts +16 -0
- package/lib/types/client/index.d.ts +6 -0
- package/lib/types/client/locales.d.ts +6 -0
- package/lib/types/client/native-switch.d.ts +10 -0
- package/lib/types/client/settings-card.d.ts +10 -0
- package/lib/types/host/engine.d.ts +4 -0
- package/lib/types/index.d.ts +8 -0
- package/lib/types/shared/core.d.ts +3 -1
- package/package.json +3 -3
- package/src/client/composer-toggle.tsx +34 -0
- package/src/client/index.ts +19 -0
- package/src/client/locales.ts +12 -0
- package/src/client/native-switch.tsx +33 -0
- package/src/client/settings-card.tsx +76 -2
- package/src/client/settings-form.ts +12 -10
- package/src/client/styles.ts +14 -0
- package/src/host/engine.ts +30 -6
- package/src/index.ts +2 -0
- package/src/shared/core.ts +5 -1
package/README.md
CHANGED
|
@@ -39,14 +39,15 @@ Automatic recovery for [DeepSeek Harness](https://github.com/deepseek-ai/deepsee
|
|
|
39
39
|
|
|
40
40
|
**Smart recovery** (all configurable):
|
|
41
41
|
|
|
42
|
+
- **Composer switch** — enable or pause auto-continue directly beside the message input, using DSH's native switch. It controls all sessions in the current profile and saves immediately. Prefer a quieter toolbar? Hide it in the plugin settings without pausing recovery
|
|
42
43
|
- **Error classification** — transient failures (network / timeout / 5xx / 429…) are auto-resumed; permanent ones are **skipped** and notified, because retrying them never helps. A failure counts as permanent when its HTTP status is 401/403 or its code/message matches auth, credential/API-key, balance/quota, unknown-model, or context-length/overflow keywords. Provider-specific exceptions can be opted into with literal custom retryable patterns; turn classification off to resume everything
|
|
43
44
|
- **Adaptive backoff** — consecutive failures wait longer each time (cooldown × factor: 20s → 40s → 80s…), capped at the max backoff, instead of hammering a broken upstream
|
|
44
45
|
- **English / Chinese localization** — the settings card, built-in resume / guard / loop text, and browser notifications follow DSH's active UI language (initially selected from the browser language). Only `en` and `zh` are supported; other languages fall back to Chinese. Switching languages updates built-in defaults without overwriting custom text
|
|
45
|
-
- **Templated continue text** — `continueText` supports `{code}` `{message}` `{status}` `{tool}` `{turn}` `{errorCount}` `{
|
|
46
|
+
- **Templated continue text** — `continueText` supports `{code}` `{message}` `{status}` `{tool}` `{turn}` `{errorCount}` `{elapsed}` placeholders, so the resume message can carry the failure context ("Continue ({tool} failed: {code})"); a **separate template** fires on `max-tokens` (e.g. "Continue the output without repeating anything already generated")
|
|
46
47
|
- **Idempotency guard** — before resuming, the plugin inspects the last tool call: if its result is unconfirmed (the turn died mid-tool, e.g. a `git push` that may have gone through), the resume message tells the model to check state first and not to rerun; if the tool is confirmed done, it says so and asks not to repeat it; a failed tool gets no guard (retrying it is the point). Both guard texts are configurable (`{tool}` / `{result}` placeholders)
|
|
47
48
|
- **Silent turn resume** — recover an observed model step or reasoning-only response that completes without visible output. A no-op turn with no model activity is left alone. Text, tool calls, images and extension blocks count as visible, including streamed output. Unobserved turns are not guessed to be silent. Explicit `no-visible-output` markers also recover after restart. Disabling **Resume silent turns** cancels queued silent sends; silent turns never reset the retry cap, even while the option is off.
|
|
48
49
|
- **Autonomous loop** — off by default (`resumeCompletedTurns`). When enabled, normally completed turns continue after the grace period, without the recovery cooldown or attempt cap. Reasoning-only turns and explicit `no-visible-output` endings still consume the recovery budget and obey backoff. Global pause, session pause, manual Stop and disabling the option stop the loop. Its prompt is separate from the loop guard’s prompt (`continueTextLoop`, default `Continue`).
|
|
49
|
-
- **Pause** — a global **Pause auto-continue** toggle in the settings card stops automatic sends from live events and startup scanning; per-session pauses (e.g. via a notification button) suspend only one session until they expire.
|
|
50
|
+
- **Pause** — a global **Pause auto-continue** toggle in the settings card stops automatic sends from live events and startup scanning; per-session pauses (e.g. via a notification button) suspend only one session until they expire. **Resume now** requests one send even when both pauses are active. It leaves the pauses in place, so later automatic recovery and autonomous-loop sends remain paused
|
|
50
51
|
- **Notification buttons** — notifications carry **Resume now** (send immediately, ignoring cooldown, the consecutive cap and any pause) and **Pause this session 1h** actions
|
|
51
52
|
- **Loop guard** — watches **running** turns too. Four signals trip the guard, which cancels the turn and restarts it with a configurable loop text ("stop repeating, try another way"): the model repeating the **exact same message** several times (any length — e.g. "Let me test variants of the regex…" ×7), repeated near-duplicate paragraphs **inside one streamed assistant message**, many short messages inside a short time window with no tool call in between (the "Let me read…" spin), or the same tool called repeatedly with the **same arguments and the same results** (a changed argument or result counts as progress). The cancel carries an internal marker so it is never confused with a user stop — the restart only happens for guard-initiated cancels. Thresholds, the time window and the loop text are configurable
|
|
52
53
|
- **Stats panel** — the settings card shows today's auto-continue count, recoveries, failures, permanent skips, give-ups and loop breaks, broken down by error code, with a one-click reset
|
|
@@ -61,10 +62,11 @@ It watches the live event streams and reacts to:
|
|
|
61
62
|
| `turn/end` → `max-tokens` | Output token ceiling reached |
|
|
62
63
|
| `turn/end` → `completed` / `no-visible-output` with no visible output | Observed model activity without visible output, or an explicit silent-ending marker |
|
|
63
64
|
| `turn/end` → `completed` | Continue a normal completion only when autonomous loop is enabled |
|
|
64
|
-
| `host/agent-error` | Agent failure with no turn position (only network/timeout-class messages auto-resume) |
|
|
65
65
|
|
|
66
66
|
**Recovery stops for:** manual Stop, policy rejection (`blocked`), paused sessions, subagent sessions and the consecutive-attempt cap. A new turn or manual user message cancels a queued continuation. Live `interrupted` markers are left to the startup recovery scan. Recoverable failures during cooldown are **deferred**, not discarded. If an interrupted session already has queued turns, the continuation runs first and the existing turns retain their order behind it. The loop guard can separately cancel and restart a running turn that is repeating itself.
|
|
67
67
|
|
|
68
|
+
Subagent sessions stay under their parent agent's control. The plugin skips them during live recovery and startup scanning, ignores **Resume now** for them, and leaves them out of loop-guard cancellation. Any queued recovery is cancelled when a session is identified as a subagent.
|
|
69
|
+
|
|
68
70
|
---
|
|
69
71
|
|
|
70
72
|
## How It Works
|
|
@@ -73,7 +75,7 @@ The host-side engine subscribes to the session event firehose inside the dsh hos
|
|
|
73
75
|
|
|
74
76
|
On host boot it also scans the live sessions: a session whose last turn ended with a non-human reason **within the scan window** (default 15 minutes), with no later `turn/start` or user message, gets resumed automatically too (e.g. the host crashed while the browser was closed — the agent-loop resumes the session and the engine picks it up).
|
|
75
77
|
|
|
76
|
-
The browser
|
|
78
|
+
The browser provides the settings card and composer switch, plus a status bridge that shows notifications (with Resume now / Pause this session 1h buttons, routed back to the host engine) and feeds the card's stats / paused-sessions panels.
|
|
77
79
|
|
|
78
80
|
### Recovery workflow
|
|
79
81
|
|
|
@@ -89,15 +91,16 @@ DSH plugins install into a **profile** (`dsh web` → `web` profile). The comman
|
|
|
89
91
|
|
|
90
92
|
| DSH runtime | Plugin version | Configuration entry point |
|
|
91
93
|
| --- | --- | --- |
|
|
94
|
+
| **0.2.1-alpha.1** | **0.13.0 verified** | **Plugins → dsh-client-auto-continue → Auto continue** |
|
|
92
95
|
| **0.2.0-rc.1** | **0.12.1 or newer** | **Plugins → dsh-client-auto-continue → Auto continue** |
|
|
93
96
|
| **0.1.7-rc.2** | **0.11.9 or newer** | Same Plugins page |
|
|
94
97
|
| Older hosts with the legacy settings API | Legacy UI retained | **Settings → Plugins → Plugin configuration** |
|
|
95
98
|
|
|
96
|
-
DSH 0.1.0-rc.6 and earlier are unsupported. Automated runtime checks cover **0.1.7-rc.2** and **0.2.
|
|
99
|
+
DSH 0.1.0-rc.6 and earlier are unsupported. Automated runtime checks cover **0.1.7-rc.2**, **0.2.0-rc.1** and **0.2.1-alpha.1**. Desktop app versions and embedded DSH runtime versions are different; use the runtime version when checking compatibility. For the CLI, run `dsh --version`; see [official DSH releases](https://github.com/deepseek-ai/deepseek-harness/releases) for available versions.
|
|
97
100
|
|
|
98
101
|
**Plugins 0.11.9 and 0.12.0 are rejected by DSH 0.2.0-rc.1’s version check.** Upgrade the plugin to 0.12.1 or newer; its existing configuration-form integration works on this runtime. See [#50](https://github.com/HsiangNianian/dsh-auto-continue/issues/50).
|
|
99
102
|
|
|
100
|
-
On current DSH, **Settings → Built-in plugins** is a component inventory, not the configuration editor. Use the main **Plugins** page. The screenshots below use **DSH 0.2.
|
|
103
|
+
On current DSH, **Settings → Built-in plugins** is a component inventory, not the configuration editor. Use the main **Plugins** page. The screenshots below use **DSH 0.2.1-alpha.1 + plugin 0.13.0**. If you previously installed with a symlink or hand-written loader entry, see [Migrating an older installation](#migrating-an-older-installation).
|
|
101
104
|
|
|
102
105
|
### From npm (recommended)
|
|
103
106
|
|
|
@@ -184,6 +187,16 @@ dsh web
|
|
|
184
187
|
|
|
185
188
|
---
|
|
186
189
|
|
|
190
|
+
## Composer switch
|
|
191
|
+
|
|
192
|
+
Starting with **0.13.0**, an **Auto-continue** switch appears beside the message input by default. It uses DSH's native `Switch` and follows the active theme.
|
|
193
|
+
|
|
194
|
+

|
|
195
|
+
|
|
196
|
+
**On** allows automatic recovery; **Off** sets the existing global `paused` option. The change saves immediately and applies to **all sessions in the current profile**, with other open tabs updating too. This is separate from the notification action that pauses one session for an hour. Enabling it does not clear a session's individual pause.
|
|
197
|
+
|
|
198
|
+
To hide the switch, open **Plugins → dsh-client-auto-continue → Auto continue**, turn off **Show auto-continue switch in the composer**, then click **Save**. This only changes visibility; recovery keeps its current state. The corresponding config key is `showComposerToggle`, default `true`. Older hosts without the composer slot retain the settings card.
|
|
199
|
+
|
|
187
200
|
## Configuration
|
|
188
201
|
|
|
189
202
|
On **DSH 0.1.7 / 0.2**, open **Plugins** from the main sidebar, choose **dsh-client-auto-continue**, then expand the **Auto continue** card. This is separate from **Settings → Built-in plugins**, which only lists component status. Older DSH versions use **Settings → Plugins → Plugin configuration**.
|
|
@@ -205,6 +218,7 @@ The browser mirrors DSH's active language into the internal `locale` field. Leav
|
|
|
205
218
|
config:
|
|
206
219
|
locale: 'en' # normally managed by the browser
|
|
207
220
|
paused: false
|
|
221
|
+
showComposerToggle: true
|
|
208
222
|
continueText: ''
|
|
209
223
|
resumeSilentTurns: true
|
|
210
224
|
resumeCompletedTurns: false
|
|
@@ -254,8 +268,9 @@ When migrating from the legacy settings file to DSH 0.1.7 / 0.2, move these valu
|
|
|
254
268
|

|
|
255
269
|
|
|
256
270
|
- Edits are **staged** — nothing reaches the disk until you hit **Save**; an unsaved badge marks the card while drafts are pending, and **Discard** drops them
|
|
271
|
+
- If you edit or reset a field while a save is in progress, the newer draft stays in the card. Click **Save** again after the current save finishes to apply it
|
|
257
272
|
- A field you changed shows an **Overridden** badge with a per-field **Reset to default** button that removes the override and restores the inherited value (normally the built-in default)
|
|
258
|
-
-
|
|
273
|
+
- **Show auto-continue switch in the composer** uses a native switch and is staged until Save. Other boolean fields are **tri-state**: *Inherit* (use the default) / *On* / *Off*
|
|
259
274
|
- Invalid drafts (non-numbers, values below the minimum) block the save with a hint
|
|
260
275
|
- In a read-only deployment the card shows the stored values but disables every control
|
|
261
276
|
- Changes apply immediately after Save and persist in the active profile config (or `~/.dsh/settings.yaml` on older hosts)
|
|
@@ -270,6 +285,7 @@ When migrating from the legacy settings file to DSH 0.1.7 / 0.2, move these valu
|
|
|
270
285
|
| Field | Default | Description |
|
|
271
286
|
| --- | --- | --- |
|
|
272
287
|
| Pause auto-continue | `off` | Global pause: no live or scan auto-send fires, queued pending sends are cancelled |
|
|
288
|
+
| Show auto-continue switch in the composer | `on` | Show the composer switch (`showComposerToggle`); hiding it does not pause recovery |
|
|
273
289
|
| Continue text | `Continue` | Text automatically sent after an interruption |
|
|
274
290
|
| Continue text (max tokens) | `Continue` | Text sent when the output token ceiling is reached (same placeholders) |
|
|
275
291
|
| Resume silent turns | `on` | Resume a turn that ended normally with reasoning only (no text, no tool call); does not reset the consecutive count |
|
|
@@ -310,7 +326,7 @@ For a provider-specific error that is safe to resume (confirm first that manuall
|
|
|
310
326
|
|
|
311
327
|
Patterns are literal substrings, not regular expressions. Blank lines are ignored; any matching line wins before the built-in permanent-error rules. Cooldown and consecutive-attempt limits still apply.
|
|
312
328
|
|
|
313
|
-
`continueText` (and `continueTextMaxTokens`, `continueTextSilent`, `continueTextLoop`) accept the placeholders `{code}`, `{message}`, `{status}`, `{tool}` (last tool call before the failure), `{turn}`, `{errorCount}` (consecutive failures including this one)
|
|
329
|
+
`continueText` (and `continueTextMaxTokens`, `continueTextSilent`, `continueTextLoop`) accept the placeholders `{code}`, `{message}`, `{status}`, `{tool}` (last tool call before the failure), `{turn}`, `{errorCount}` (consecutive failures including this one) and `{elapsed}` (time since the failure, e.g. `1m5s`) — e.g. `Continue ({tool}: {code})` becomes `Continue (git push: UPSTREAM)`. The guard texts accept `{tool}` and `{result}` (a truncated excerpt of the last tool output). The host engine currently leaves `{sessionTitle}` empty.
|
|
314
330
|
|
|
315
331
|
---
|
|
316
332
|
|
|
@@ -340,9 +356,9 @@ npm test
|
|
|
340
356
|
npm run test:runtime
|
|
341
357
|
```
|
|
342
358
|
|
|
343
|
-
`npm test` covers recovery, autonomous-loop limits and toggles, startup scanning, queue ordering, statistics, localization
|
|
359
|
+
`npm test` covers recovery, autonomous-loop limits and toggles, child-session exclusion, manual resume during pauses, startup scanning, queue ordering, statistics, localization, settings UI lifecycle and edits made during pending saves. `npm run test:runtime` uses published DSH **0.1.7-rc.2** and **0.2.0-rc.1** Settings, Loader and HTTP services. It also runs the actual 0.2 profile compatibility gate and checks client activation with Cordis 4.0.4 when one settings provider is absent. The runtime harness controls agent events; it does not send requests to a model provider.
|
|
344
360
|
|
|
345
|
-
`npm run
|
|
361
|
+
After editing a linked checkout, run `npm run build` to write the updated `lib/` files, then restart DSH and refresh the browser. Hosts with client HMR enabled can reload a rebuilt client bundle automatically.
|
|
346
362
|
|
|
347
363
|
CI typechecks, rebuilds, runs both test suites, verifies committed `lib/` artifacts and runs [dsh-plugin-check](https://github.com/omdsh-dev/dsh-plugin-check). The same checks gate releases. See [screenshot capture notes](docs/screenshots/README.md) when updating the UI documentation.
|
|
348
364
|
|
package/README.zh.md
CHANGED
|
@@ -39,14 +39,15 @@
|
|
|
39
39
|
|
|
40
40
|
**智能恢复**(全部可配置):
|
|
41
41
|
|
|
42
|
+
- **会话区开关** — 在输入框旁用 DSH 原生开关直接启停自动继续,控制当前 profile 下的所有会话,修改立即保存。也可在插件配置中隐藏开关,不影响自动继续的运行状态
|
|
42
43
|
- **错误分类** — 临时性错误(网络 / 超时 / 5xx / 429 等)自动续跑; 永久性错误跳过并通知, 因为重试也没用。判定为永久性的条件: HTTP 状态码 401/403, 或 code/message 命中认证、凭据/API Key、余额/配额、模型不存在、上下文长度/超限等关键词。provider 专属例外可由用户显式填写普通文本匹配; 关闭分类后则全部自动继续
|
|
43
44
|
- **自适应退避** — 连续失败时等待时间递增(冷却 × 系数: 20s → 40s → 80s…), 有上限, 不再对故障上游狂轰滥炸
|
|
44
45
|
- **中英文本地化** — 设置卡片、内置续跑 / 护栏 / 循环文案以及浏览器通知都跟随 DSH 当前界面语言(初始值来自浏览器语言)。只支持 `en` 和 `zh`, 其他语言回落中文; 切换语言只会替换内置默认值, 不会覆盖用户自定义文本
|
|
45
|
-
- **模板化继续文本** — `continueText` 支持 `{code}` `{message}` `{status}` `{tool}` `{turn}` `{errorCount}` `{
|
|
46
|
+
- **模板化继续文本** — `continueText` 支持 `{code}` `{message}` `{status}` `{tool}` `{turn}` `{errorCount}` `{elapsed}` 占位符, 续跑消息可携带失败上下文(如「继续 (git push 失败: UPSTREAM)」); 达到 `max-tokens` 时使用**另一套模板**(如「继续输出, 不要重复已生成的内容」)
|
|
46
47
|
- **幂等护栏** — 续跑前检查上一步工具调用: 结果未确认(回合在工具执行中途夭折, 如 `git push` 可能已经推上去了)时, 续跑消息会提示模型先确认状态、不要重复执行; 工具已确认成功时说明已完成、请勿重复; 工具失败则不加护栏(重试本来就是目的)。两段护栏文本都可配置(支持 `{tool}` / `{result}` 占位符)
|
|
47
48
|
- **无输出回合续跑** — 已观察到模型步骤或推理回复,但回合正常结束且没有可见输出时自动恢复。没有模型活动的空回合不会触发;文本、工具调用、图片、扩展块和已显示的流式内容均算可见输出。未观察到开始的回合不会被猜测为静默。启动后也能恢复显式的 `no-visible-output` 标记。关闭开关会取消排队中的静默续跑;即使开关关闭,静默回合也不会清零重试上限。
|
|
48
49
|
- **自主循环** — 默认关闭(`resumeCompletedTurns`)。开启后,正常完成的回合经过宽限期便会续跑,不受恢复冷却和次数上限约束。仅有推理的回合和显式 `no-visible-output` 仍消耗重试预算并遵守退避。全局暂停、会话暂停、手动停止或关闭该选项都会停止循环。自主循环使用单独的提示文本 `continueTextLoop`(默认 `继续`),与循环守卫的提示文本不同。
|
|
49
|
-
- **暂停** — 设置卡片里的全局 **暂停自动继续** 开关会停止实时事件与启动扫描触发的自动发送; 会话级暂停(如通过通知按钮)只挂起单个会话,
|
|
50
|
+
- **暂停** — 设置卡片里的全局 **暂停自动继续** 开关会停止实时事件与启动扫描触发的自动发送; 会话级暂停(如通过通知按钮)只挂起单个会话, 到期自动恢复。即使两种暂停同时生效,通知里的 **立即续跑** 仍可发送一次。发送后保留暂停状态,后续自动恢复和自主循环仍受暂停约束
|
|
50
51
|
- **通知按钮** — 通知带 **立即续跑**(无视冷却、连续上限与暂停, 马上发送)和 **暂停该会话 1 小时** 按钮
|
|
51
52
|
- **循环守卫** — 连**运行中的回合**也盯着, 四个信号都会触发守卫(取消当前回合并用可配置的循环提示文本重启, 「停止重复, 换一种方式」): 模型**连续输出完全相同的消息**(不限长度, 如 "Let me test variants of the regex…" 连续 7 遍)、单条流式 assistant 消息内部出现连续近似重复段落、短时间内连续多条短句且期间无工具调用(典型的「Let me read…」空转)、或同一工具被连续反复调用且**参数与结果都相同**(参数或结果有变化视为有进展)。取消带有内部来源标记, 绝不会与用户手动停止混淆——只有守卫发起的取消才会重启。阈值、时间窗与提示文本都可配置
|
|
52
53
|
- **统计面板** — 设置卡片展示今日自动继续次数、恢复成功、继续后失败、永久性跳过、达上限停止、循环打断, 按错误码统计, 可一键清零
|
|
@@ -61,10 +62,11 @@
|
|
|
61
62
|
| `turn/end` → `max-tokens` | 达到输出 token 上限 |
|
|
62
63
|
| `turn/end` → `completed` / `no-visible-output` 且无可见输出 | 已观察到模型活动但没有可见输出,或收到显式无输出结束标记 |
|
|
63
64
|
| `turn/end` → `completed` | 仅在开启自主循环时续跑正常完成的回合 |
|
|
64
|
-
| `host/agent-error` | 无回合位置的 Agent 失败(仅网络/超时类消息自动续跑) |
|
|
65
65
|
|
|
66
66
|
**恢复会停止于:**用户手动停止、策略拒绝(`blocked`)、暂停、子代理会话以及连续次数上限。新回合开始或用户手动发送消息会取消待发送的继续提示;实时 `interrupted` 标记交给启动扫描处理。冷却期间出现的可恢复错误会**延后重试,不会直接丢弃**。已有排队消息时,续跑消息先执行,原有消息随后按原顺序处理。循环守卫则可以单独打断并重启正在重复动作的回合。
|
|
67
67
|
|
|
68
|
+
子代理会话由父代理管理。插件会在实时恢复和启动扫描中跳过它们,忽略对它们发起的 **立即续跑**,循环守卫也不会打断它们。识别出子代理会话时,已排队的恢复操作会被取消。
|
|
69
|
+
|
|
68
70
|
---
|
|
69
71
|
|
|
70
72
|
## 工作原理
|
|
@@ -73,7 +75,7 @@
|
|
|
73
75
|
|
|
74
76
|
宿主启动时还会扫描存活会话: 最后一个回合在**扫描时间窗**(默认 15 分钟)内以非人为原因结束、且其后没有新回合或用户消息的会话, 会被自动续跑(例如浏览器关闭期间宿主崩溃——agent-loop 恢复会话后引擎接着接手)。
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
浏览器负责设置卡片、会话区开关和一条状态桥(展示通知, 带「立即续跑 / 暂停该会话 1 小时」按钮并把动作回传给宿主引擎; 驱动卡片里的统计与暂停面板)。
|
|
77
79
|
|
|
78
80
|
### 恢复流程
|
|
79
81
|
|
|
@@ -89,15 +91,16 @@ DSH 插件安装进 **profile**(`dsh web` 对应 `web` profile)。下面的命
|
|
|
89
91
|
|
|
90
92
|
| DSH 内核 | 插件版本 | 配置入口 |
|
|
91
93
|
| --- | --- | --- |
|
|
94
|
+
| **0.2.1-alpha.1** | **已验证 0.13.0** | **插件 → dsh-client-auto-continue → 自动继续** |
|
|
92
95
|
| **0.2.0-rc.1** | **0.12.1 或更新版本** | **插件 → dsh-client-auto-continue → 自动继续** |
|
|
93
96
|
| **0.1.7-rc.2** | **0.11.9 或更新版本** | 同上,从主侧栏的插件页进入 |
|
|
94
97
|
| 使用旧设置 API 的宿主 | 保留旧版设置界面兼容 | **设置 → 插件 → 插件配置** |
|
|
95
98
|
|
|
96
|
-
不支持 DSH 0.1.0-rc.6 及更早版本。自动化运行时测试覆盖 **0.1.7-rc.2** 和 **0.2.
|
|
99
|
+
不支持 DSH 0.1.0-rc.6 及更早版本。自动化运行时测试覆盖 **0.1.7-rc.2**、**0.2.0-rc.1** 和 **0.2.1-alpha.1**。桌面应用版本不等于内置的 DSH 内核版本,请按内核版本判断兼容性;CLI 可运行 `dsh --version`,可用版本见 [DSH 官方 Releases](https://github.com/deepseek-ai/deepseek-harness/releases)。
|
|
97
100
|
|
|
98
101
|
**插件 0.11.9 和 0.12.0 会被 DSH 0.2.0-rc.1 的版本检查拦截。** 请升级到 0.12.1 或更新版本;现有配置表单接口可在该内核正常工作。详见 [#50](https://github.com/HsiangNianian/dsh-auto-continue/issues/50)。
|
|
99
102
|
|
|
100
|
-
当前 DSH 的**设置 → 内置插件**是组件状态列表,配置应从主侧栏的**插件**页面进入。下方截图使用 **DSH 0.2.
|
|
103
|
+
当前 DSH 的**设置 → 内置插件**是组件状态列表,配置应从主侧栏的**插件**页面进入。下方截图使用 **DSH 0.2.1-alpha.1 + 插件 0.13.0**。此前通过软链或手写 Loader 条目安装的用户,请参考[旧安装迁移](#旧安装迁移)。
|
|
101
104
|
|
|
102
105
|
### 从 npm 安装(推荐)
|
|
103
106
|
|
|
@@ -184,6 +187,16 @@ dsh web
|
|
|
184
187
|
|
|
185
188
|
---
|
|
186
189
|
|
|
190
|
+
## 会话区开关
|
|
191
|
+
|
|
192
|
+
从 **0.13.0** 起,输入框旁默认显示**自动继续**开关,使用 DSH 原生 `Switch`,跟随当前主题。
|
|
193
|
+
|
|
194
|
+

|
|
195
|
+
|
|
196
|
+
**开**允许自动恢复,**关**会设置已有的全局 `paused` 选项。修改立即保存,作用于**当前 profile 下的所有会话**,其他已打开的标签页也会同步。它与通知中「暂停该会话 1 小时」的单会话操作是分开的;重新打开全局开关不会解除单个会话的暂停。
|
|
197
|
+
|
|
198
|
+
想隐藏开关时,进入**插件 → dsh-client-auto-continue → 自动继续**,关闭**在会话区显示自动继续开关**,再点**保存**。这只改变显示,自动继续保持原来的运行状态。对应配置键为 `showComposerToggle`,默认 `true`。没有会话工具栏插槽的旧宿主仍可使用设置卡片。
|
|
199
|
+
|
|
187
200
|
## 配置
|
|
188
201
|
|
|
189
202
|
在 **DSH 0.1.7 / 0.2** 中, 从主侧栏打开**插件**, 选择 **dsh-client-auto-continue**, 再展开**自动继续**卡片。**设置 → 内置插件**是单独的组件状态列表, 不能在其中编辑配置。旧版 DSH 的入口仍为**设置 → 插件 → 插件配置**。
|
|
@@ -205,6 +218,7 @@ DSH 0.1.7 / 0.2 将这些值保存在当前 profile patch 的 `auto-continue`
|
|
|
205
218
|
config:
|
|
206
219
|
locale: 'zh' # 通常由浏览器自动维护
|
|
207
220
|
paused: false
|
|
221
|
+
showComposerToggle: true
|
|
208
222
|
continueText: ''
|
|
209
223
|
resumeSilentTurns: true
|
|
210
224
|
resumeCompletedTurns: false
|
|
@@ -254,8 +268,9 @@ auto-continue:
|
|
|
254
268
|

|
|
255
269
|
|
|
256
270
|
- 修改是**暂存式**的——点「保存」之前不会写入磁盘; 有待保存草稿时卡片显示「未保存」徽章, 「放弃」可丢弃草稿
|
|
271
|
+
- 保存期间继续修改或重置字段时,新的草稿会保留在卡片中;等待当前保存结束后,再点一次「保存」即可应用
|
|
257
272
|
- 改动过的字段会带「已覆盖」徽章, 并有逐字段的「恢复默认」按钮(移除覆盖项,恢复继承值,通常为内置默认值)
|
|
258
|
-
-
|
|
273
|
+
- **在会话区显示自动继续开关**使用原生开关,点保存后生效。其他布尔字段是三态:**继承**(用默认) / 开 / 关
|
|
259
274
|
- 非法输入(非数字、小于最小值)会阻止保存并给出提示
|
|
260
275
|
- 只读部署中卡片只显示已存值, 所有控件禁用
|
|
261
276
|
- 保存后立即生效,持久化在当前 profile 配置中(旧版宿主使用 `~/.dsh/settings.yaml`)
|
|
@@ -270,6 +285,7 @@ auto-continue:
|
|
|
270
285
|
| 字段 | 默认 | 说明 |
|
|
271
286
|
| --- | --- | --- |
|
|
272
287
|
| 暂停自动继续 | 关 | 全局暂停: 实时与扫描都不再自动发送, 已排队的待发送也会取消 |
|
|
288
|
+
| 在会话区显示自动继续开关 | 开 | 显示输入框旁的开关(`showComposerToggle`);隐藏不会暂停自动继续 |
|
|
273
289
|
| 继续文本 | `继续` | 中断后自动发送的消息内容 |
|
|
274
290
|
| 超限时的继续文本 | `继续` | 达到输出 token 上限时自动发送的文本(支持相同占位符) |
|
|
275
291
|
| 续跑无输出回合 | 开 | 回合正常结束但只有推理(没有文本、没有工具调用)时自动续跑; 不清零连续次数 |
|
|
@@ -310,7 +326,7 @@ auto-continue:
|
|
|
310
326
|
|
|
311
327
|
匹配项是普通子串, 不是正则表达式。空行会被忽略; 任一行命中后会优先于内置永久错误规则。冷却与最大连续次数仍然生效。
|
|
312
328
|
|
|
313
|
-
`continueText`(以及 `continueTextMaxTokens`、`continueTextSilent`、`continueTextLoop`)支持占位符 `{code}`、`{message}`、`{status}`、`{tool}`(失败前最后一次工具调用)、`{turn}`、`{errorCount}`(连续失败次数, 含本次)
|
|
329
|
+
`continueText`(以及 `continueTextMaxTokens`、`continueTextSilent`、`continueTextLoop`)支持占位符 `{code}`、`{message}`、`{status}`、`{tool}`(失败前最后一次工具调用)、`{turn}`、`{errorCount}`(连续失败次数, 含本次)和 `{elapsed}`(距失败经过的时间, 如 `1m5s`)——例如 `继续 ({tool}: {code})` 会变成 `继续 (git push: UPSTREAM)`。护栏文本支持 `{tool}` 与 `{result}`(上一步工具输出的截断摘要)。当前宿主引擎会将 `{sessionTitle}` 替换为空字符串。
|
|
314
330
|
|
|
315
331
|
---
|
|
316
332
|
|
|
@@ -340,9 +356,9 @@ npm test
|
|
|
340
356
|
npm run test:runtime
|
|
341
357
|
```
|
|
342
358
|
|
|
343
|
-
`npm test`
|
|
359
|
+
`npm test` 覆盖错误恢复、自主循环上限与开关、子会话排除、暂停期间手动续跑、启动扫描、队列顺序、统计、本地化、设置界面生命周期及保存期间继续编辑的情况。`npm run test:runtime` 使用已发布的 DSH **0.1.7-rc.2** 和 **0.2.0-rc.1** Settings、Loader、HTTP 组件,并运行真实的 0.2 profile 兼容检查,以及 Cordis 4.0.4 中缺少其中一种设置服务时的客户端激活测试。运行时测试使用受控的 agent 事件,不会向模型服务发送请求。
|
|
344
360
|
|
|
345
|
-
`npm run
|
|
361
|
+
修改链接的本地仓库后,运行 `npm run build` 写入最新的 `lib/` 产物,再重启 DSH 并刷新浏览器。开启 client HMR 的宿主可自动重新加载已构建的客户端包。
|
|
346
362
|
|
|
347
363
|
CI 执行类型检查、构建、两组测试、已提交 `lib/` 产物校验及 [dsh-plugin-check](https://github.com/omdsh-dev/dsh-plugin-check),发布也受这些检查约束。更新界面文档时请参考[截图采集说明](docs/screenshots/README.md)。
|
|
348
364
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
# Configuration screenshots
|
|
1
|
+
# Configuration and composer screenshots
|
|
2
2
|
|
|
3
|
-
Captured on 2026-
|
|
4
|
-
**dsh-client-auto-continue 0.
|
|
3
|
+
Captured on 2026-10-06 using **DSH 0.2.1-alpha.1** and
|
|
4
|
+
the **dsh-client-auto-continue 0.13.0** release build in Chromium, with DSH's dark theme.
|
|
5
5
|
These are screenshots of the running application in an isolated `DSH_HOME`
|
|
6
6
|
with no user sessions or API keys.
|
|
7
7
|
|
|
8
8
|
| View | English | Chinese | Viewport |
|
|
9
9
|
| --- | --- | --- | --- |
|
|
10
|
-
| Plugins → dsh-client-auto-continue, collapsed card | [01-settings-section.png](01-settings-section.png) | [01-settings-section.zh.png](01-settings-section.zh.png) | 1440 ×
|
|
11
|
-
| Expanded card, recovery prompts and autonomous loop | [02-settings-card.png](02-settings-card.png) | [02-settings-card.zh.png](02-settings-card.zh.png) | 1440 × 1400 |
|
|
10
|
+
| Plugins → dsh-client-auto-continue, collapsed card | [01-settings-section.png](01-settings-section.png) | [01-settings-section.zh.png](01-settings-section.zh.png) | 1440 × 610 |
|
|
11
|
+
| Expanded card, composer visibility, recovery prompts and autonomous loop | [02-settings-card.png](02-settings-card.png) | [02-settings-card.zh.png](02-settings-card.zh.png) | 1440 × 1400 |
|
|
12
12
|
| Live status and Save / Discard controls | [07-card-panels.png](07-card-panels.png) | [07-card-panels.zh.png](07-card-panels.zh.png) | 1440 × 950 |
|
|
13
|
+
| Native composer switch | [08-composer-toggle.png](08-composer-toggle.png) | [08-composer-toggle.zh.png](08-composer-toggle.zh.png) | 1440 × 900, cropped to the 828 × 256 composer area |
|
|
13
14
|
|
|
14
|
-
To refresh them, first verify `dsh --version` is `0.2.
|
|
15
|
+
To refresh them, first verify `dsh --version` is `0.2.1-alpha.1`, then create
|
|
15
16
|
an empty DSH home and install the released plugin:
|
|
16
17
|
|
|
17
18
|
```bash
|
|
18
19
|
capture_home="$(mktemp -d)"
|
|
19
|
-
DSH_HOME="$capture_home" dsh plugin --profile web add dsh-client-auto-continue@0.
|
|
20
|
+
DSH_HOME="$capture_home" dsh plugin --profile web add dsh-client-auto-continue@0.13.0
|
|
20
21
|
DSH_HOME="$capture_home" dsh web --no-open
|
|
21
22
|
```
|
|
22
23
|
|
|
@@ -25,12 +26,16 @@ screenshot. Dismiss onboarding, select the dark theme, and navigate from the
|
|
|
25
26
|
main sidebar's **Plugins** button.
|
|
26
27
|
|
|
27
28
|
Capture the collapsed card, expand it for the top-of-page view, then scroll to
|
|
28
|
-
its Save / Discard footer
|
|
29
|
+
its Save / Discard footer. For the composer view, open a new session and crop
|
|
30
|
+
the screenshot to the message input and workspace controls. Switch **Settings → General →
|
|
29
31
|
Language** to Chinese and wait for the translated interface to finish rendering
|
|
30
32
|
before repeating the captures. Use device scale factor 1 and the viewports
|
|
31
33
|
above; keep the UI content unchanged.
|
|
32
34
|
|
|
33
|
-
Before capture, verify that
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
Before capture, verify that toggling the composer switch updates another open
|
|
36
|
+
tab and persists after a reload. Turn off composer visibility in the settings:
|
|
37
|
+
it should remain visible until Save, then disappear without changing `paused`.
|
|
38
|
+
Reset both overrides before capturing. Wait for the profile writes to finish
|
|
39
|
+
before checking the saved file. Keep the form at its defaults and record the
|
|
40
|
+
host/plugin versions when updating these images. Also check the switch in the
|
|
41
|
+
light theme and at a narrow viewport (393 × 852).
|