dsh-client-auto-continue 0.11.9 → 0.12.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/README.md +143 -79
- package/README.zh.md +143 -79
- 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/README.md +36 -0
- package/lib/client.js +68 -6
- package/lib/client.js.map +2 -2
- package/lib/index.js +74 -13
- package/lib/types/client/locales.d.ts +7 -0
- package/lib/types/client/settings-card.d.ts +2 -0
- package/lib/types/host/engine.d.ts +6 -1
- package/lib/types/index.d.ts +16 -0
- package/lib/types/shared/core.d.ts +8 -0
- package/package.json +4 -4
- package/src/client/locales.ts +20 -6
- package/src/client/settings-card.tsx +36 -1
- package/src/client/styles.ts +2 -0
- package/src/host/engine.ts +91 -12
- package/src/index.ts +4 -0
- package/src/shared/core.ts +17 -0
package/README.zh.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<h1 align="center">dsh-auto-continue</h1>
|
|
9
9
|
|
|
10
10
|
<p align="center">
|
|
11
|
-
<em
|
|
11
|
+
<em>自动恢复中断的 DSH 会话,也可选择开启自主循环,在正常完成后继续工作。</em>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
<p align="center">
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
## 它做什么
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的 Web 界面和桌面应用提供自动恢复。会话因可恢复错误中断时,插件通过 DSH 发送你配置的继续提示。引擎运行在**宿主进程**中,浏览器标签页关闭后仍会工作,多个标签页共享同一个引擎。默认开启中断恢复;成功回合后也继续工作的**自主循环需要手动开启**。
|
|
37
37
|
|
|
38
38
|

|
|
39
39
|
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
- **模板化继续文本** — `continueText` 支持 `{code}` `{message}` `{status}` `{tool}` `{turn}` `{errorCount}` `{sessionTitle}` `{elapsed}` 占位符, 续跑消息可携带失败上下文(如「继续 (git push 失败: UPSTREAM)」); 达到 `max-tokens` 时使用**另一套模板**(如「继续输出, 不要重复已生成的内容」)
|
|
46
46
|
- **幂等护栏** — 续跑前检查上一步工具调用: 结果未确认(回合在工具执行中途夭折, 如 `git push` 可能已经推上去了)时, 续跑消息会提示模型先确认状态、不要重复执行; 工具已确认成功时说明已完成、请勿重复; 工具失败则不加护栏(重试本来就是目的)。两段护栏文本都可配置(支持 `{tool}` / `{result}` 占位符)
|
|
47
47
|
- **无输出回合续跑** — 已观察到模型步骤或推理回复,但回合正常结束且没有可见输出时自动恢复。没有模型活动的空回合不会触发;文本、工具调用、图片、扩展块和已显示的流式内容均算可见输出。未观察到开始的回合不会被猜测为静默。启动后也能恢复显式的 `no-visible-output` 标记。关闭开关会取消排队中的静默续跑;即使开关关闭,静默回合也不会清零重试上限。
|
|
48
|
-
-
|
|
48
|
+
- **自主循环** — 默认关闭(`resumeCompletedTurns`)。开启后,正常完成的回合经过宽限期便会续跑,不受恢复冷却和次数上限约束。仅有推理的回合和显式 `no-visible-output` 仍消耗重试预算并遵守退避。全局暂停、会话暂停、手动停止或关闭该选项都会停止循环。自主循环使用单独的提示文本 `continueTextLoop`(默认 `继续`),与循环守卫的提示文本不同。
|
|
49
|
+
- **暂停** — 设置卡片里的全局 **暂停自动继续** 开关会停止实时事件与启动扫描触发的自动发送; 会话级暂停(如通过通知按钮)只挂起单个会话, 到期自动恢复。唯一的显式例外是通知里的 **立即续跑** 按钮——按下它等于用户明确要求发送这一次, 不受暂停限制
|
|
49
50
|
- **通知按钮** — 通知带 **立即续跑**(无视冷却、连续上限与暂停, 马上发送)和 **暂停该会话 1 小时** 按钮
|
|
50
51
|
- **循环守卫** — 连**运行中的回合**也盯着, 四个信号都会触发守卫(取消当前回合并用可配置的循环提示文本重启, 「停止重复, 换一种方式」): 模型**连续输出完全相同的消息**(不限长度, 如 "Let me test variants of the regex…" 连续 7 遍)、单条流式 assistant 消息内部出现连续近似重复段落、短时间内连续多条短句且期间无工具调用(典型的「Let me read…」空转)、或同一工具被连续反复调用且**参数与结果都相同**(参数或结果有变化视为有进展)。取消带有内部来源标记, 绝不会与用户手动停止混淆——只有守卫发起的取消才会重启。阈值、时间窗与提示文本都可配置
|
|
51
52
|
- **统计面板** — 设置卡片展示今日自动继续次数、恢复成功、继续后失败、永久性跳过、达上限停止、循环打断, 按错误码统计, 可一键清零
|
|
@@ -58,16 +59,17 @@
|
|
|
58
59
|
| `turn/end` → `error` | 回合失败(模型 / 网络 / 超时等) |
|
|
59
60
|
| `turn/end` → `interrupted` | 宿主崩溃重启后遗留的中断回合(由启动扫描恢复) |
|
|
60
61
|
| `turn/end` → `max-tokens` | 达到输出 token 上限 |
|
|
61
|
-
| `turn/end` → `completed` / `no-visible-output` 且无可见输出 |
|
|
62
|
+
| `turn/end` → `completed` / `no-visible-output` 且无可见输出 | 已观察到模型活动但没有可见输出,或收到显式无输出结束标记 |
|
|
63
|
+
| `turn/end` → `completed` | 仅在开启自主循环时续跑正常完成的回合 |
|
|
62
64
|
| `host/agent-error` | 无回合位置的 Agent 失败(仅网络/超时类消息自动续跑) |
|
|
63
65
|
|
|
64
|
-
|
|
66
|
+
**恢复会停止于:**用户手动停止、策略拒绝(`blocked`)、暂停、子代理会话以及连续次数上限。新回合开始或用户手动发送消息会取消待发送的继续提示;实时 `interrupted` 标记交给启动扫描处理。冷却期间出现的可恢复错误会**延后重试,不会直接丢弃**。已有排队消息时,续跑消息先执行,原有消息随后按原顺序处理。循环守卫则可以单独打断并重启正在重复动作的回合。
|
|
65
67
|
|
|
66
68
|
---
|
|
67
69
|
|
|
68
70
|
## 工作原理
|
|
69
71
|
|
|
70
|
-
宿主侧引擎在 dsh 宿主进程内订阅会话事件 firehose
|
|
72
|
+
宿主侧引擎在 dsh 宿主进程内订阅会话事件 firehose——**多个浏览器标签页共享一个引擎**。检测到中断后先等待一个**宽限期**(默认 3 秒)——若宿主自行开启了新回合(`turn/start`), 自动继续即取消——然后经 agent 注册表(`agent.followup`, 与「发送」按钮同一个排队通道)发送配置的文本。若队列已有消息, 引擎会在宿主唤醒 agent 之前只把本次续跑消息移到队首, 不删除或重排用户消息。
|
|
71
73
|
|
|
72
74
|
宿主启动时还会扫描存活会话: 最后一个回合在**扫描时间窗**(默认 15 分钟)内以非人为原因结束、且其后没有新回合或用户消息的会话, 会被自动续跑(例如浏览器关闭期间宿主崩溃——agent-loop 恢复会话后引擎接着接手)。
|
|
73
75
|
|
|
@@ -81,23 +83,35 @@
|
|
|
81
83
|
|
|
82
84
|
## 快速开始
|
|
83
85
|
|
|
84
|
-
DSH 插件安装进 **profile**(`dsh web` 对应 `web` profile)
|
|
86
|
+
DSH 插件安装进 **profile**(`dsh web` 对应 `web` profile)。下面的命令用于 Web 版, 安装后重启 `dsh web`。桌面版请通过应用内的**插件**页面安装。
|
|
85
87
|
|
|
86
|
-
|
|
88
|
+
### 版本兼容
|
|
87
89
|
|
|
88
|
-
|
|
90
|
+
| DSH 内核 | 插件版本 | 配置入口 |
|
|
91
|
+
| --- | --- | --- |
|
|
92
|
+
| **0.2.0-rc.1** | **0.12.1 或更新版本** | **插件 → dsh-client-auto-continue → 自动继续** |
|
|
93
|
+
| **0.1.7-rc.2** | **0.11.9 或更新版本** | 同上,从主侧栏的插件页进入 |
|
|
94
|
+
| 使用旧设置 API 的宿主 | 保留旧版设置界面兼容 | **设置 → 插件 → 插件配置** |
|
|
95
|
+
|
|
96
|
+
不支持 DSH 0.1.0-rc.6 及更早版本。自动化运行时测试覆盖 **0.1.7-rc.2** 和 **0.2.0-rc.1**。桌面应用版本不等于内置的 DSH 内核版本,请按内核版本判断兼容性;CLI 可运行 `dsh --version`,可用版本见 [DSH 官方 Releases](https://github.com/deepseek-ai/deepseek-harness/releases)。
|
|
89
97
|
|
|
90
|
-
|
|
98
|
+
**插件 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
|
+
|
|
100
|
+
当前 DSH 的**设置 → 内置插件**是组件状态列表,配置应从主侧栏的**插件**页面进入。下方截图使用 **DSH 0.2.0-rc.1 + 插件 0.12.1**。此前通过软链或手写 Loader 条目安装的用户,请参考[旧安装迁移](#旧安装迁移)。
|
|
91
101
|
|
|
92
102
|
### 从 npm 安装(推荐)
|
|
93
103
|
|
|
94
104
|
已发布为 [`dsh-client-auto-continue`](https://www.npmjs.com/package/dsh-client-auto-continue):
|
|
95
105
|
|
|
96
106
|
```bash
|
|
97
|
-
dsh plugin --profile web add dsh-client-auto-continue
|
|
107
|
+
dsh plugin --profile web add dsh-client-auto-continue@latest
|
|
98
108
|
dsh web
|
|
99
109
|
```
|
|
100
110
|
|
|
111
|
+
### 更新已安装的插件
|
|
112
|
+
|
|
113
|
+
等当前任务结束后停止 DSH,再次执行上面的 npm 安装命令,用 `@latest` 更新插件,然后重启 DSH 并刷新浏览器。已有配置覆盖项会保留。桌面版请从应用内的**插件**页面更新并重启应用;更新 CLI 的 `web` profile 不会同步更新桌面版的 profile。
|
|
114
|
+
|
|
101
115
|
### 直接从 GitHub 安装(无需克隆)
|
|
102
116
|
|
|
103
117
|
直接从仓库默认分支安装——构建产物已提交入库, 无需本地克隆或构建:
|
|
@@ -111,107 +125,148 @@ dsh web
|
|
|
111
125
|
|
|
112
126
|
### 从本仓库安装
|
|
113
127
|
|
|
114
|
-
|
|
128
|
+
请使用与 CI 相同的 Node.js 22。
|
|
115
129
|
|
|
116
130
|
```bash
|
|
117
131
|
git clone https://github.com/HsiangNianian/dsh-auto-continue.git
|
|
118
132
|
cd dsh-auto-continue
|
|
119
|
-
npm
|
|
133
|
+
npm ci
|
|
120
134
|
npm run build
|
|
121
135
|
|
|
122
136
|
# 包自带 cordis.patch.yml(通过 dsh.bundle.patch 声明),
|
|
123
137
|
# 插件行会自动注册
|
|
124
|
-
dsh plugin --profile web add link:$(pwd)
|
|
138
|
+
dsh plugin --profile web add "link:$(pwd)"
|
|
125
139
|
|
|
126
140
|
dsh web
|
|
127
141
|
```
|
|
128
142
|
|
|
129
|
-
###
|
|
143
|
+
### 旧安装迁移
|
|
130
144
|
|
|
131
|
-
|
|
132
|
-
ln -sfn "$(pwd)" ~/.dsh/profiles/node_modules/dsh-client-auto-continue
|
|
133
|
-
# 然后在 ~/.dsh/profiles/web/cordis.patch.yml 追加:
|
|
134
|
-
# - insert:
|
|
135
|
-
# - id: auto-continue
|
|
136
|
-
# name: 'dsh-client-auto-continue'
|
|
137
|
-
dsh web
|
|
138
|
-
```
|
|
145
|
+
手动添加 Loader 条目可以启动引擎, 但未必会在**插件**页面登记 bundle。请通过 profile 的包管理命令安装; 不再推荐只创建软链并添加 `insert` 条目。
|
|
139
146
|
|
|
140
|
-
|
|
147
|
+
1. 等当前任务结束后停止 `dsh web`。备份 `~/.dsh/profiles/web/` 下的 `package.json`、`cordis.patch.yml`、`pnpm-lock.yaml`, 以及存在时的 `~/.dsh/settings.yaml`。如果设置了 `DSH_HOME`, 请用该目录替代 `~/.dsh`。
|
|
148
|
+
2. 保留已有的自动继续参数。只删除 **`insert` 列表内**手动添加的 `auto-continue` 行; 若列表因此变空, 一并删除空列表。安装包会提供该行。顶层的 `- id: auto-continue` 搭配 `config:` 是配置覆盖项, **应当保留**。
|
|
149
|
+
3. 使用上面的 npm 或 GitHub 命令安装。profile 的 `package.json` 中, `dsh.profile.bundles` 应在原有 DSH bundles 之外包含 `dsh-client-auto-continue`。如果已经包含, 且**插件**页面已有该插件, 这一步已经完成。
|
|
150
|
+
4. 在 DSH 0.1.7 / 0.2 上, 将旧 `settings.yaml` → `auto-continue` 段落或已移除条目的 `config` 参数合并到 profile 的 `cordis.patch.yml`。例如, 自定义冷却时间写成:
|
|
141
151
|
|
|
142
|
-
|
|
152
|
+
```yaml
|
|
153
|
+
- id: auto-continue
|
|
154
|
+
config:
|
|
155
|
+
cooldownMs: 45000 # 示例: 请保留你原先设置的值
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
若已有覆盖项, 请合并到其中, 不要重复添加。保留其他设置。DSH 0.1.7 / 0.2 读取的是条目配置, 修改旧 `settings.yaml` 段落不会更新新版表单。
|
|
159
|
+
5. 重新启动 `dsh web` 并刷新浏览器。打开**插件 → dsh-client-auto-continue**, 展开**自动继续**, 检查旧参数是否保留。保存一次修改并刷新, 确认配置持久化正常。
|
|
160
|
+
|
|
161
|
+
**内置插件**里显示的 `include:auto-continue` 是正常的 Loader 前缀, 单凭这个名字不能判断为旧安装或重复引擎。
|
|
143
162
|
|
|
144
163
|
### 验证与卸载
|
|
145
164
|
|
|
146
165
|
```bash
|
|
147
|
-
dsh --profile web --dump-config | grep auto-continue
|
|
166
|
+
dsh --profile web --dump-config | grep -A 4 'id: auto-continue'
|
|
148
167
|
```
|
|
149
168
|
|
|
150
|
-
|
|
169
|
+
合并后的配置应只有一个 `id: auto-continue` 条目。在**插件 → dsh-client-auto-continue**中确认组件**运行中**, 展开**自动继续**后能编辑字段。开启详细日志后, 引擎活动会输出到运行 DSH 的终端。
|
|
151
170
|
|
|
152
171
|
```bash
|
|
153
172
|
dsh plugin --profile web remove dsh-client-auto-continue # npm / 仓库安装
|
|
154
|
-
#
|
|
173
|
+
# cordis.patch.yml 中若有该插件的配置覆盖项, 也一并移除
|
|
155
174
|
dsh web
|
|
156
175
|
```
|
|
157
176
|
|
|
158
177
|
---
|
|
159
178
|
|
|
179
|
+
## 常见问题
|
|
180
|
+
|
|
181
|
+
- **提示 “skipping profile bundle” 或 “incompatible with dsh 0.2.0-rc.1”:** 在应用实际使用的 profile 中升级到插件 0.12.1 或更新版本,再重启应用。此修复不需要授予版本豁免。
|
|
182
|
+
- **已启用,但看不到配置:** 从主侧栏打开**插件**,选择该包并展开**自动继续**;内置插件状态页没有可编辑字段。
|
|
183
|
+
- **`/api/auto-continue-bridge` 返回 404:** 检查 DSH 启动日志与合并配置,确认宿主组件已加载。刷新配置卡片不能启动缺失的宿主组件。
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
160
187
|
## 配置
|
|
161
188
|
|
|
162
|
-
|
|
189
|
+
在 **DSH 0.1.7 / 0.2** 中, 从主侧栏打开**插件**, 选择 **dsh-client-auto-continue**, 再展开**自动继续**卡片。**设置 → 内置插件**是单独的组件状态列表, 不能在其中编辑配置。旧版 DSH 的入口仍为**设置 → 插件 → 插件配置**。
|
|
190
|
+
|
|
191
|
+

|
|
192
|
+
|
|
193
|
+
点击卡片标题或右侧箭头即可展开字段。卡片内还带有**统计面板**(今日活动, 可一键清零)和**已暂停会话**列表(每个都可单独解除)。
|
|
163
194
|
|
|
164
195
|
新版配置卡会按接力方式、安全节奏、恢复雷达、循环断路器与现场状态组织配置; 卡片顶部也直接放出了开源仓库和 **Star on GitHub** 入口。
|
|
165
196
|
|
|
166
|
-
DSH 0.1.7 将这些值保存在当前 profile patch 的 `auto-continue` 条目 config
|
|
197
|
+
DSH 0.1.7 / 0.2 将这些值保存在当前 profile patch 的 `auto-continue` 条目 config 中(默认 Web profile 对应 `~/.dsh/profiles/web/cordis.patch.yml`)。点**保存**后实时生效, 无需重启引擎。省略的字段使用下表默认值。
|
|
167
198
|
|
|
168
199
|
启动恢复会每三秒等待一次延迟加载的会话,在引擎启动后的 `freshMs` 时间窗结束。每个已就绪会话的历史只检查一次,`scanLimit` 只限制每轮符合条件的恢复数量,正常会话或永久错误不会挤占名额。暂停会在同一时间窗内挂起恢复,卸载插件会取消轮询。
|
|
169
200
|
|
|
170
|
-
浏览器会把 DSH 当前语言同步到内部 `locale`
|
|
201
|
+
浏览器会把 DSH 当前语言同步到内部 `locale` 字段。下面七个本地化文本字段保持留空或直接省略时, 会自动跟随语言; 任何非空值都视为用户自己的模板, 切换语言时不会改写:
|
|
202
|
+
|
|
203
|
+
```yaml
|
|
204
|
+
- id: auto-continue
|
|
205
|
+
config:
|
|
206
|
+
locale: 'zh' # 通常由浏览器自动维护
|
|
207
|
+
paused: false
|
|
208
|
+
continueText: ''
|
|
209
|
+
resumeSilentTurns: true
|
|
210
|
+
resumeCompletedTurns: false
|
|
211
|
+
continueTextSilent: ''
|
|
212
|
+
continueTextLoop: ''
|
|
213
|
+
continueTextMaxTokens: ''
|
|
214
|
+
guardTools: true
|
|
215
|
+
guardPendingText: ''
|
|
216
|
+
guardDoneText: ''
|
|
217
|
+
graceMs: 3000
|
|
218
|
+
cooldownMs: 20000
|
|
219
|
+
maxConsecutive: 3
|
|
220
|
+
scanOnBoot: true
|
|
221
|
+
scanLimit: 8
|
|
222
|
+
freshMs: 900000
|
|
223
|
+
verbose: true
|
|
224
|
+
classify: true
|
|
225
|
+
retryableErrorPatterns: ''
|
|
226
|
+
backoffFactor: 2
|
|
227
|
+
backoffMaxMs: 300000
|
|
228
|
+
notify: false
|
|
229
|
+
loopGuard: true
|
|
230
|
+
loopShortChars: 40
|
|
231
|
+
loopWindowMs: 30000
|
|
232
|
+
loopShortCount: 12
|
|
233
|
+
loopRepeatText: 4
|
|
234
|
+
loopToolRepeat: 5
|
|
235
|
+
loopText: ''
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
<details>
|
|
239
|
+
<summary>旧版 DSH 的配置文件</summary>
|
|
240
|
+
|
|
241
|
+
旧版宿主将用户设置保存在 `~/.dsh/settings.yaml` 的插件命名空间下, 而非 profile 条目中:
|
|
171
242
|
|
|
172
243
|
```yaml
|
|
173
244
|
auto-continue:
|
|
174
|
-
|
|
175
|
-
paused: false
|
|
176
|
-
continueText: ''
|
|
177
|
-
resumeSilentTurns: true
|
|
178
|
-
continueTextSilent: ''
|
|
179
|
-
continueTextMaxTokens: ''
|
|
180
|
-
guardTools: true
|
|
181
|
-
guardPendingText: ''
|
|
182
|
-
guardDoneText: ''
|
|
183
|
-
graceMs: 3000
|
|
184
|
-
cooldownMs: 20000
|
|
185
|
-
maxConsecutive: 3
|
|
186
|
-
scanOnBoot: true
|
|
187
|
-
scanLimit: 8
|
|
188
|
-
freshMs: 900000
|
|
189
|
-
verbose: true
|
|
190
|
-
classify: true
|
|
191
|
-
retryableErrorPatterns: ''
|
|
192
|
-
backoffFactor: 2
|
|
193
|
-
backoffMaxMs: 300000
|
|
194
|
-
notify: false
|
|
195
|
-
loopGuard: true
|
|
196
|
-
loopShortChars: 40
|
|
197
|
-
loopWindowMs: 30000
|
|
198
|
-
loopShortCount: 12
|
|
199
|
-
loopRepeatText: 4
|
|
200
|
-
loopToolRepeat: 5
|
|
201
|
-
loopText: ''
|
|
245
|
+
cooldownMs: 45000
|
|
202
246
|
```
|
|
203
247
|
|
|
248
|
+
从旧设置文件迁移到 DSH 0.1.7 / 0.2 时, 请按[旧安装迁移](#旧安装迁移)将这些值移入 profile 条目的 `config`。
|
|
249
|
+
|
|
250
|
+
</details>
|
|
251
|
+
|
|
204
252
|
**卡片操作说明:**
|
|
205
253
|
|
|
206
|
-

|
|
207
255
|
|
|
208
256
|
- 修改是**暂存式**的——点「保存」之前不会写入磁盘; 有待保存草稿时卡片显示「未保存」徽章, 「放弃」可丢弃草稿
|
|
209
|
-
- 改动过的字段会带「已覆盖」徽章,
|
|
257
|
+
- 改动过的字段会带「已覆盖」徽章, 并有逐字段的「恢复默认」按钮(移除覆盖项,恢复继承值,通常为内置默认值)
|
|
210
258
|
- 布尔字段是三态:**继承**(用默认)/ 开 / 关
|
|
211
259
|
- 非法输入(非数字、小于最小值)会阻止保存并给出提示
|
|
212
260
|
- 只读部署中卡片只显示已存值, 所有控件禁用
|
|
213
261
|
- 保存后立即生效,持久化在当前 profile 配置中(旧版宿主使用 `~/.dsh/settings.yaml`)
|
|
214
262
|
|
|
263
|
+
<details>
|
|
264
|
+
<summary>现场状态与底部的保存 / 放弃按钮</summary>
|
|
265
|
+
|
|
266
|
+

|
|
267
|
+
|
|
268
|
+
</details>
|
|
269
|
+
|
|
215
270
|
| 字段 | 默认 | 说明 |
|
|
216
271
|
| --- | --- | --- |
|
|
217
272
|
| 暂停自动继续 | 关 | 全局暂停: 实时与扫描都不再自动发送, 已排队的待发送也会取消 |
|
|
@@ -219,6 +274,8 @@ auto-continue:
|
|
|
219
274
|
| 超限时的继续文本 | `继续` | 达到输出 token 上限时自动发送的文本(支持相同占位符) |
|
|
220
275
|
| 续跑无输出回合 | 开 | 回合正常结束但只有推理(没有文本、没有工具调用)时自动续跑; 不清零连续次数 |
|
|
221
276
|
| 无输出回合的继续文本 | `继续。你上一轮只输出了内部推理, ...` | 续跑无输出回合时发送的文本(支持相同占位符) |
|
|
277
|
+
| 自主循环(每个回合后都续跑) | 关 | 正常完成后经过宽限期续跑,不受恢复冷却和上限限制;仅有推理和显式无输出结束仍消耗重试预算 |
|
|
278
|
+
| 自主循环的继续文本 | `继续` | 自主循环续跑时发送的文本(支持相同占位符) |
|
|
222
279
|
| 幂等护栏 | 开 | 续跑前检查上一步工具调用并给出指引(见「它做什么」) |
|
|
223
280
|
| 循环守卫 | 开 | 检测运行中的回合空转并重启(见「它做什么」) |
|
|
224
281
|
| 短句长度上限 (字符) | `40` | 模型消息文本短于该值计为一条短句(空转信号) |
|
|
@@ -230,12 +287,12 @@ auto-continue:
|
|
|
230
287
|
| 结果未确认时的护栏文本 | `(上一步工具「{tool}」可能未完成, 先确认状态再继续, 不要重复执行)` | 上一步工具可能已部分执行时附加; 支持 {tool} 占位符 |
|
|
231
288
|
| 工具已成功时的护栏文本 | `(上一步工具「{tool}」已完成, 结果: {result}; 不要重复执行, 直接继续)` | 上一步工具已确认成功时附加; 支持 {tool} / {result} 占位符 |
|
|
232
289
|
| 宽限期 (ms) | `3000` | 中断后等待的时长; 期间宿主自行恢复则取消 |
|
|
233
|
-
| 冷却时间 (ms) | `20000` |
|
|
234
|
-
| 最大连续次数 | `3` |
|
|
290
|
+
| 冷却时间 (ms) | `20000` | 同一会话恢复尝试的最小间隔;期间出现的失败会等待剩余冷却,再进入宽限期 |
|
|
291
|
+
| 最大连续次数 | `3` | 连续恢复尝试上限;用户介入或观察到有可见输出的成功回合后重置。正常完成后的自主循环接力不计入 |
|
|
235
292
|
| 启动恢复扫描 | 开 | 恢复启动时间窗内延迟加载的中断会话 |
|
|
236
293
|
| 扫描会话数 | `8` | 每轮最多恢复的符合条件的会话数,优先最近活动的会话 |
|
|
237
294
|
| 扫描时间窗 (ms) | `900000` | 中断的最大年龄,同时限制启动轮询的持续时间 |
|
|
238
|
-
| 详细日志 | 开 |
|
|
295
|
+
| 详细日志 | 开 | 在运行 DSH 的终端输出 `[auto-continue]` 引擎日志 |
|
|
239
296
|
| 错误分类 | 开 | 仅自动恢复临时性错误; 认证 / 余额 / 模型等永久性错误跳过并通知 |
|
|
240
297
|
| 自定义可恢复错误 | 空 | 每行一个大小写不敏感的普通文本片段; 命中错误码、HTTP 状态或消息时显式覆盖内置分类 |
|
|
241
298
|
| 退避系数 | `2` | 连续失败时冷却间隔的倍率(2 = 20s → 40s → 80s…) |
|
|
@@ -245,42 +302,49 @@ auto-continue:
|
|
|
245
302
|
遇到确认可以安全续跑的 provider 专属错误时(先确认手动发送「继续」确实能恢复), 应添加足够具体、稳定的片段, 而不是全局关闭错误分类:
|
|
246
303
|
|
|
247
304
|
```yaml
|
|
248
|
-
auto-continue
|
|
249
|
-
|
|
250
|
-
|
|
305
|
+
- id: auto-continue
|
|
306
|
+
config:
|
|
307
|
+
retryableErrorPatterns: |-
|
|
308
|
+
Upstream rejected the request as invalid
|
|
251
309
|
```
|
|
252
310
|
|
|
253
311
|
匹配项是普通子串, 不是正则表达式。空行会被忽略; 任一行命中后会优先于内置永久错误规则。冷却与最大连续次数仍然生效。
|
|
254
312
|
|
|
255
|
-
`continueText
|
|
313
|
+
`continueText`(以及 `continueTextMaxTokens`、`continueTextSilent`、`continueTextLoop`)支持占位符 `{code}`、`{message}`、`{status}`、`{tool}`(失败前最后一次工具调用)、`{turn}`、`{errorCount}`(连续失败次数, 含本次)、`{sessionTitle}`(来自会话列表)和 `{elapsed}`(距失败经过的时间, 如 `1m5s`)——例如 `继续 ({tool}: {code})` 会变成 `继续 (git push: UPSTREAM)`。护栏文本支持 `{tool}` 与 `{result}`(上一步工具输出的截断摘要)。
|
|
256
314
|
|
|
257
315
|
---
|
|
258
316
|
|
|
259
317
|
## 隐私与权限
|
|
260
318
|
|
|
261
|
-
|
|
319
|
+
恢复引擎运行在 DSH 宿主进程中, 浏览器负责配置卡片、实时状态和可选通知:
|
|
262
320
|
|
|
263
|
-
-
|
|
264
|
-
-
|
|
265
|
-
-
|
|
321
|
+
- 引擎通过 DSH 服务读取会话事件和历史, 浏览器与该宿主通信; 插件不新增第三方服务或凭据存储
|
|
322
|
+
- 恢复时通过 `agent.followup` 发送你配置的文本。循环守卫可先通过 `agent.cancel` 停止空转回合, 再发送恢复提示; 续跑的 Agent 沿用会话已有的工具和权限
|
|
323
|
+
- 保存配置使用 DSH 的设置 API: DSH 0.1.7 / 0.2 写入当前 profile patch, 旧版宿主写入 `~/.dsh/settings.yaml`
|
|
324
|
+
- 重试计数、冷却时间戳、会话级暂停与统计保存在宿主进程内存中,引擎重启后重置;全局 `paused` 开关随其他配置持久化保存
|
|
266
325
|
- 浏览器通知是可选开启的(`notify` 设置), 仅在首次使用时请求一次权限
|
|
267
326
|
|
|
268
327
|
---
|
|
269
328
|
|
|
270
329
|
## 开发
|
|
271
330
|
|
|
272
|
-
|
|
331
|
+
使用 Node.js 22,安装两个锁定版本的运行时测试环境,即可在本地执行 CI 检查:
|
|
273
332
|
|
|
274
333
|
```bash
|
|
275
|
-
npm
|
|
276
|
-
npm
|
|
277
|
-
npm
|
|
278
|
-
npm run
|
|
334
|
+
npm ci
|
|
335
|
+
npm ci --prefix tests/fixtures/dsh-0.1.7
|
|
336
|
+
npm ci --prefix tests/fixtures/dsh-0.2.0
|
|
337
|
+
npm run typecheck
|
|
338
|
+
npm run build
|
|
339
|
+
npm test
|
|
340
|
+
npm run test:runtime
|
|
279
341
|
```
|
|
280
342
|
|
|
281
|
-
`npm run
|
|
343
|
+
`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
|
+
|
|
345
|
+
`npm run watch` 监听本地代码并重新构建。宿主开启 client HMR 时可以热重载链接的客户端包;否则构建后重启 DSH 并刷新浏览器。
|
|
282
346
|
|
|
283
|
-
CI
|
|
347
|
+
CI 执行类型检查、构建、两组测试、已提交 `lib/` 产物校验及 [dsh-plugin-check](https://github.com/omdsh-dev/dsh-plugin-check),发布也受这些检查约束。更新界面文档时请参考[截图采集说明](docs/screenshots/README.md)。
|
|
284
348
|
|
|
285
349
|
---
|
|
286
350
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Configuration screenshots
|
|
2
|
+
|
|
3
|
+
Captured on 2026-09-30 using **DSH 0.2.0-rc.1** and
|
|
4
|
+
**dsh-client-auto-continue 0.12.1** in Chromium, with DSH's dark theme.
|
|
5
|
+
These are screenshots of the running application in an isolated `DSH_HOME`
|
|
6
|
+
with no user sessions or API keys.
|
|
7
|
+
|
|
8
|
+
| View | English | Chinese | Viewport |
|
|
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 × 760 |
|
|
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 |
|
|
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
|
+
|
|
14
|
+
To refresh them, first verify `dsh --version` is `0.2.0-rc.1`, then create
|
|
15
|
+
an empty DSH home and install the released plugin:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
capture_home="$(mktemp -d)"
|
|
19
|
+
DSH_HOME="$capture_home" dsh plugin --profile web add dsh-client-auto-continue@0.12.1
|
|
20
|
+
DSH_HOME="$capture_home" dsh web --no-open
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Open the authenticated URL printed by DSH without including that URL in any
|
|
24
|
+
screenshot. Dismiss onboarding, select the dark theme, and navigate from the
|
|
25
|
+
main sidebar's **Plugins** button.
|
|
26
|
+
|
|
27
|
+
Capture the collapsed card, expand it for the top-of-page view, then scroll to
|
|
28
|
+
its Save / Discard footer for the final view. Switch **Settings → General →
|
|
29
|
+
Language** to Chinese and wait for the translated interface to finish rendering
|
|
30
|
+
before repeating the captures. Use device scale factor 1 and the viewports
|
|
31
|
+
above; keep the UI content unchanged.
|
|
32
|
+
|
|
33
|
+
Before capture, verify that a text change and a numeric change both persist
|
|
34
|
+
after Save and a browser reload, then reset those overrides. Wait for the
|
|
35
|
+
profile writes to finish before checking the saved file. Keep the form at its
|
|
36
|
+
defaults and record the host/plugin versions when updating these images.
|
package/lib/client.js
CHANGED
|
@@ -41,6 +41,7 @@ var LOCALIZED_TEXT_DEFAULTS = {
|
|
|
41
41
|
continueText: "继续",
|
|
42
42
|
continueTextMaxTokens: "继续",
|
|
43
43
|
continueTextSilent: "继续。你上一轮只输出了内部推理, 既没有回复也没有调用工具, 用户什么都没看到。每一轮都要以工具调用或可见回复结束。",
|
|
44
|
+
continueTextLoop: "继续",
|
|
44
45
|
guardPendingText: "(上一步工具「{tool}」可能未完成, 先确认状态再继续, 不要重复执行)",
|
|
45
46
|
guardDoneText: "(上一步工具「{tool}」已完成, 结果: {result}; 不要重复执行, 直接继续)",
|
|
46
47
|
loopText: "(检测到你可能陷入循环, 请停止重复刚才的动作, 换一种方式继续)"
|
|
@@ -49,6 +50,7 @@ var LOCALIZED_TEXT_DEFAULTS = {
|
|
|
49
50
|
continueText: "Continue",
|
|
50
51
|
continueTextMaxTokens: "Continue",
|
|
51
52
|
continueTextSilent: "Continue. Your previous turn ended with internal reasoning only, with no message and no tool call, so nothing reached the user. Always finish a turn with a tool call or a visible answer.",
|
|
53
|
+
continueTextLoop: "Continue",
|
|
52
54
|
guardPendingText: '(The previous tool "{tool}" may not have completed. Check its state before continuing and do not run it again.)',
|
|
53
55
|
guardDoneText: '(The previous tool "{tool}" completed successfully. Result: {result}; do not run it again. Continue from there.)',
|
|
54
56
|
loopText: "(You may be stuck in a loop. Stop repeating the last action and continue with a different approach.)"
|
|
@@ -58,6 +60,8 @@ var DEFAULT_CONFIG = {
|
|
|
58
60
|
locale: "zh",
|
|
59
61
|
...LOCALIZED_TEXT_DEFAULTS.zh,
|
|
60
62
|
resumeSilentTurns: true,
|
|
63
|
+
resumeCompletedTurns: false,
|
|
64
|
+
continueTextLoop: "",
|
|
61
65
|
guardTools: true,
|
|
62
66
|
graceMs: 3e3,
|
|
63
67
|
cooldownMs: 2e4,
|
|
@@ -93,6 +97,8 @@ var zh = {
|
|
|
93
97
|
"repo.aria": "打开 dsh-auto-continue 的 GitHub 开源地址并点 Star",
|
|
94
98
|
"section.handoff.title": "接力方式",
|
|
95
99
|
"section.handoff.description": "决定中断后说什么,以及什么时候暂时停手。",
|
|
100
|
+
"section.autoloop.title": "自主循环",
|
|
101
|
+
"section.autoloop.description": "每个回合结束后自动把对话交还给 Agent,直到手动停止。",
|
|
96
102
|
"section.safety.title": "安全节奏",
|
|
97
103
|
"section.safety.description": "先确认上一步,再控制等待与连续续跑的边界。",
|
|
98
104
|
"section.recovery.title": "恢复雷达",
|
|
@@ -111,6 +117,11 @@ var zh = {
|
|
|
111
117
|
"default.continueTextMaxTokens": LOCALIZED_TEXT_DEFAULTS.zh.continueTextMaxTokens,
|
|
112
118
|
"field.resumeSilentTurns": "续跑无输出回合",
|
|
113
119
|
"field.resumeSilentTurnsHint": "已观察到模型活动但没有可见输出时续跑;不把空回合、图片或扩展内容误判为静默,冷却与连续上限照常生效。",
|
|
120
|
+
"field.resumeCompletedTurns": "自主循环(每个回合后都续跑)",
|
|
121
|
+
"field.resumeCompletedTurnsHint": "正常完成后经过宽限期自动续跑,不受恢复冷却和次数上限限制;仅有推理或显式无输出的回合仍消耗重试预算。暂停或关闭该选项可停止后续接力,手动停止或发送消息会取消当前待发送的继续提示。",
|
|
122
|
+
"field.continueTextLoop": "自主循环的继续文本",
|
|
123
|
+
"field.continueTextLoopHint": "自主循环每次续跑时发送的文本。",
|
|
124
|
+
"default.continueTextLoop": LOCALIZED_TEXT_DEFAULTS.zh.continueTextLoop,
|
|
114
125
|
"field.continueTextSilent": "无输出回合的继续文本",
|
|
115
126
|
"field.continueTextSilentHint": "回合只输出推理就结束时自动发送的文本, 支持与继续文本相同的占位符。",
|
|
116
127
|
"default.continueTextSilent": LOCALIZED_TEXT_DEFAULTS.zh.continueTextSilent,
|
|
@@ -125,9 +136,9 @@ var zh = {
|
|
|
125
136
|
"field.graceMs": "宽限期 (ms)",
|
|
126
137
|
"field.graceMsHint": "检测到中断后等待的时长; 期间宿主自行恢复则取消。",
|
|
127
138
|
"field.cooldownMs": "冷却时间 (ms)",
|
|
128
|
-
"field.cooldownMsHint": "
|
|
139
|
+
"field.cooldownMsHint": "同一会话恢复尝试的最小间隔;期间出现的失败会等待剩余冷却,再进入宽限期。正常完成后的自主循环接力不受此限制。",
|
|
129
140
|
"field.maxConsecutive": "最大连续次数",
|
|
130
|
-
"field.maxConsecutiveHint": "
|
|
141
|
+
"field.maxConsecutiveHint": "连续恢复尝试上限;用户介入或观察到有可见输出的成功回合后清零。正常完成后的自主循环接力不计入。",
|
|
131
142
|
"field.scanOnBoot": "启动恢复扫描",
|
|
132
143
|
"field.scanOnBootHint": "宿主启动后在扫描时间窗内等待延迟加载的中断会话,每个已就绪会话只检查一次。",
|
|
133
144
|
"field.scanLimit": "扫描会话数",
|
|
@@ -135,7 +146,7 @@ var zh = {
|
|
|
135
146
|
"field.freshMs": "扫描时间窗 (ms)",
|
|
136
147
|
"field.freshMsHint": "只处理该时间窗内的中断;启动轮询也会在这段时间后结束。",
|
|
137
148
|
"field.verbose": "详细日志",
|
|
138
|
-
"field.verboseHint": "
|
|
149
|
+
"field.verboseHint": "在 DSH 宿主日志中输出 [auto-continue] 引擎活动;CLI 用户可在运行 DSH 的终端查看。",
|
|
139
150
|
"field.classify": "错误分类",
|
|
140
151
|
"field.classifyHint": "仅自动恢复临时性错误(网络/超时/5xx 等); 认证/余额/模型不存在等永久性错误跳过并通知。",
|
|
141
152
|
"field.retryableErrorPatterns": "自定义可恢复错误",
|
|
@@ -202,6 +213,8 @@ var en = {
|
|
|
202
213
|
"repo.aria": "Open the dsh-auto-continue repository on GitHub and star it",
|
|
203
214
|
"section.handoff.title": "The handoff",
|
|
204
215
|
"section.handoff.description": "Choose what gets sent after an interruption and when the relay should stand down.",
|
|
216
|
+
"section.autoloop.title": "Autonomous loop",
|
|
217
|
+
"section.autoloop.description": "Hand the thread back after every completed turn until manually stopped.",
|
|
205
218
|
"section.safety.title": "Safety rhythm",
|
|
206
219
|
"section.safety.description": "Confirm the previous step, then set the boundaries for waiting and repeated resumes.",
|
|
207
220
|
"section.recovery.title": "Recovery radar",
|
|
@@ -220,6 +233,11 @@ var en = {
|
|
|
220
233
|
"default.continueTextMaxTokens": LOCALIZED_TEXT_DEFAULTS.en.continueTextMaxTokens,
|
|
221
234
|
"field.resumeSilentTurns": "Resume silent turns",
|
|
222
235
|
"field.resumeSilentTurnsHint": "Resume observed model activity without visible output. No-op turns, images and extension blocks are not treated as silent; cooldown and retry limits still apply.",
|
|
236
|
+
"field.resumeCompletedTurns": "Autonomous loop (continue after every turn)",
|
|
237
|
+
"field.resumeCompletedTurnsHint": "Continue normal completions after grace, without the recovery cooldown or cap. Reasoning-only and explicit silent endings still consume the retry budget. Pause or disable this option to stop future handoffs; Stop or a manual message cancels the queued continuation.",
|
|
238
|
+
"field.continueTextLoop": "Continue text (autonomous loop)",
|
|
239
|
+
"field.continueTextLoopHint": "Text sent on each autonomous-loop continuation.",
|
|
240
|
+
"default.continueTextLoop": LOCALIZED_TEXT_DEFAULTS.en.continueTextLoop,
|
|
223
241
|
"field.continueTextSilent": "Continue text (silent turn)",
|
|
224
242
|
"field.continueTextSilentHint": "Text sent when a turn ends with reasoning only; same placeholders as the continue text.",
|
|
225
243
|
"default.continueTextSilent": LOCALIZED_TEXT_DEFAULTS.en.continueTextSilent,
|
|
@@ -234,9 +252,9 @@ var en = {
|
|
|
234
252
|
"field.graceMs": "Grace period (ms)",
|
|
235
253
|
"field.graceMsHint": "Wait after an interruption; cancelled if the host recovers on its own.",
|
|
236
254
|
"field.cooldownMs": "Cooldown (ms)",
|
|
237
|
-
"field.cooldownMsHint": "Minimum interval between
|
|
255
|
+
"field.cooldownMsHint": "Minimum interval between recovery attempts; failures during cooldown wait for the remaining interval, then grace. Normal autonomous-loop handoffs are exempt.",
|
|
238
256
|
"field.maxConsecutive": "Max consecutive",
|
|
239
|
-
"field.maxConsecutiveHint": "
|
|
257
|
+
"field.maxConsecutiveHint": "Consecutive recovery-attempt cap; resets on user intervention or an observed completion with visible output. Normal autonomous-loop handoffs are exempt.",
|
|
240
258
|
"field.scanOnBoot": "Scan on host startup",
|
|
241
259
|
"field.scanOnBootHint": "Wait for delayed interrupted sessions during the startup scan window; inspect each settled session once.",
|
|
242
260
|
"field.scanLimit": "Scan limit",
|
|
@@ -244,7 +262,7 @@ var en = {
|
|
|
244
262
|
"field.freshMs": "Scan window (ms)",
|
|
245
263
|
"field.freshMsHint": "Only interruptions inside this window are considered; startup polling also ends after this duration.",
|
|
246
264
|
"field.verbose": "Verbose logs",
|
|
247
|
-
"field.verboseHint": "
|
|
265
|
+
"field.verboseHint": "Write engine activity to DSH host logs with the [auto-continue] prefix; CLI users can read them in the terminal running DSH.",
|
|
248
266
|
"field.classify": "Classify errors",
|
|
249
267
|
"field.classifyHint": "Auto-resume transient failures only (network/timeout/5xx…); auth, balance and model errors are skipped and notified.",
|
|
250
268
|
"field.retryableErrorPatterns": "Custom retryable errors",
|
|
@@ -641,6 +659,7 @@ var css = `
|
|
|
641
659
|
--dsh-ac-violet: #8b7cff;
|
|
642
660
|
--dsh-ac-cyan: #45cce5;
|
|
643
661
|
--dsh-ac-mint: #46d69d;
|
|
662
|
+
--dsh-ac-red: #e5484d;
|
|
644
663
|
--dsh-ac-amber: #f1b95c;
|
|
645
664
|
isolation: isolate;
|
|
646
665
|
position: relative;
|
|
@@ -863,6 +882,7 @@ var css = `
|
|
|
863
882
|
background: color-mix(in srgb, var(--dsw-alias-bg-layer-3) 95%, var(--dsh-ac-section) 5%);
|
|
864
883
|
}
|
|
865
884
|
.dshAcFormSection-handoff { --dsh-ac-section: var(--dsh-ac-mint); }
|
|
885
|
+
.dshAcFormSection-autoloop { --dsh-ac-section: var(--dsh-ac-red); }
|
|
866
886
|
.dshAcFormSection-safety { --dsh-ac-section: var(--dsh-ac-amber); }
|
|
867
887
|
.dshAcFormSection-recovery { --dsh-ac-section: var(--dsh-ac-cyan); }
|
|
868
888
|
.dshAcFormSection-loop { --dsh-ac-section: var(--dsh-ac-violet); }
|
|
@@ -1047,6 +1067,8 @@ var AutoContinueSettingsCardController = class {
|
|
|
1047
1067
|
textField("continueText"),
|
|
1048
1068
|
textField("continueTextMaxTokens"),
|
|
1049
1069
|
booleanField("resumeSilentTurns"),
|
|
1070
|
+
booleanField("resumeCompletedTurns"),
|
|
1071
|
+
textField("continueTextLoop"),
|
|
1050
1072
|
textField("continueTextSilent"),
|
|
1051
1073
|
booleanField("guardTools"),
|
|
1052
1074
|
textField("guardPendingText"),
|
|
@@ -1080,6 +1102,8 @@ var AutoContinueSettingsCardController = class {
|
|
|
1080
1102
|
continueText: this.form.field("continueText"),
|
|
1081
1103
|
continueTextMaxTokens: this.form.field("continueTextMaxTokens"),
|
|
1082
1104
|
resumeSilentTurns: this.form.field("resumeSilentTurns"),
|
|
1105
|
+
resumeCompletedTurns: this.form.field("resumeCompletedTurns"),
|
|
1106
|
+
continueTextLoop: this.form.field("continueTextLoop"),
|
|
1083
1107
|
continueTextSilent: this.form.field("continueTextSilent"),
|
|
1084
1108
|
guardTools: this.form.field("guardTools"),
|
|
1085
1109
|
guardPendingText: this.form.field("guardPendingText"),
|
|
@@ -1513,6 +1537,44 @@ function AutoContinueSettingsCard(props) {
|
|
|
1513
1537
|
]
|
|
1514
1538
|
}
|
|
1515
1539
|
),
|
|
1540
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1541
|
+
SettingsSection,
|
|
1542
|
+
{
|
|
1543
|
+
t,
|
|
1544
|
+
titleKey: "section.autoloop.title",
|
|
1545
|
+
descriptionKey: "section.autoloop.description",
|
|
1546
|
+
tone: "autoloop",
|
|
1547
|
+
children: [
|
|
1548
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1549
|
+
BooleanField,
|
|
1550
|
+
{
|
|
1551
|
+
wide: true,
|
|
1552
|
+
id: "auto-continue-resume-completed-turns",
|
|
1553
|
+
label: t("field.resumeCompletedTurns"),
|
|
1554
|
+
hint: t("field.resumeCompletedTurnsHint"),
|
|
1555
|
+
...shared,
|
|
1556
|
+
...state2.resumeCompletedTurns,
|
|
1557
|
+
onEdit: (text) => props.edit("resumeCompletedTurns", text),
|
|
1558
|
+
onReset: () => props.resetField("resumeCompletedTurns")
|
|
1559
|
+
}
|
|
1560
|
+
),
|
|
1561
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1562
|
+
ValueField,
|
|
1563
|
+
{
|
|
1564
|
+
wide: true,
|
|
1565
|
+
id: "auto-continue-continue-text-loop",
|
|
1566
|
+
label: t("field.continueTextLoop"),
|
|
1567
|
+
hint: t("field.continueTextLoopHint"),
|
|
1568
|
+
...shared,
|
|
1569
|
+
...state2.continueTextLoop,
|
|
1570
|
+
onEdit: (text) => props.edit("continueTextLoop", text),
|
|
1571
|
+
placeholder: t("default.continueTextLoop"),
|
|
1572
|
+
onReset: () => props.resetField("continueTextLoop")
|
|
1573
|
+
}
|
|
1574
|
+
)
|
|
1575
|
+
]
|
|
1576
|
+
}
|
|
1577
|
+
),
|
|
1516
1578
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1517
1579
|
SettingsSection,
|
|
1518
1580
|
{
|