aqiu817/dsh-plugin-continue-on-limit ↗★ 0
dsh-plugin-continue-on-limit
DeepSeek Harness plugin that auto-continues a turn the model ended by exhausting its output-token limit, with a per-session burst cap and a minimum interval between continuations. 适合长文本生成任务,可自动延续被截断的对话,支持设置最大续写次数与最小间隔。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:aqiu817/dsh-plugin-continue-on-limitREADME
Read the full README ↗配置
三个字段全部是 .volatile():在 Plugins 页面改了不重载 fiber,
enabled: false 中途就能掐断一条正在跑的链。
| 字段 | 类型 | 默认 | 说明 |
|---|---|---|---|
enabled | boolean | true | 总开关 |
continueText | string (1–200) | 继续 | 发什么文字 |
maxConsecutive | integer (0–16) | 3 | 单会话一条截断链最多自动续写几次;0 = 无上限 |
minIntervalMs | integer (0–600000) | 1500 | 两次续写的最小间隔,防死循环 |
cordis.patch.yml 里的默认值:
- insert:
- id: continue-on-limit
name: 'dsh-plugin-continue-on-limit'
config:
enabled: true
continueText: '继续'
maxConsecutive: 3
minIntervalMs: 1500
配置值不会被敲错一个数就失控
.volatile() 字段是从 Plugins 页面直接写进 reference cell 的,不走加载器的
Config 校验。也就是说 schema 只守住了初始组合那一次,运行期改值无人把关。
如果不加防护,在设置页把 maxConsecutive 敲成 -1 就能让它失效:
decide() 里 if (maxConsecutive > 0 && ...) 直接短路,上限静默变成无限制。
minIntervalMs: -1 同理让冷却失效。
所以 readSettings() 对每个字段做了类型检查 + 钳制(LIMITS 和 schema 共用同一份
边界常量):
| 输入 | 结果 |
|---|---|
maxConsecutive: -1 / 99 / 2.5 / 'lots' | 回落到默认 3 |
maxConsecutive: 0 | 保留 0(显式的"无上限"是刻意选项) |
minIntervalMs: -50 / 7000000 | 回落到默认 1500 |
continueText: 42 / ' ' | 回落到默认 '继续' |
continueText: 'x'.repeat(400) | 截到 200 |
continueText: ' trim me ' | 去空白 → 'trim me' |
enabled: 'nope' | 回落到默认 true |
关键点是负数回落到默认值,而不是回落到 0。0 是"关掉这道闸",一个误输的
负数不该有这个权力。