dsh-auto-stop
DSH plugin: end a response just before its output-token ceiling, and make a subagent's parent agent continue it. 适合需要处理超长文本输出、避免因截断导致信息丢失的用户。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ADkun/dsh-auto-stopドキュメント
README 全文を読む ↗Configuration
Every field is editable live from the Plugins page; the plugin re-reads its resolved config before each model call, so a saved value applies to the very next response.
| option | default | what it does |
|---|---|---|
enabled | true | master switch |
reserveRatio | 0.05 | fraction of the ceiling to leave unused |
reserveMin | 256 | floor for that reserve, for small ceilings |
charsPerToken | 3.5 | characters per token outside the CJK ranges |
cjkTokensPerChar | 0.8 | tokens per CJK character |
minBudget | 1024 | ceilings below this are not touched at all |
notifyParent | true | hand a truncated child back to its parent |
parentPrompt | (Chinese, two lines) | the notice; {agentId}, {tokens}, {continueMessage} |
continueMessage | 继续(从断点接着写,不要重复已写内容) | what the parent is told to send back |
The cutoff lands at ceiling - max(reserveMin, ceiling * reserveRatio). The
reserve pays for the estimator's error, for the block-closing chunks, and for
whatever the provider counts that no delta ever carried. Ending a response a few
hundred tokens early is harmless; overshooting the real ceiling is the failure
this plugin exists to prevent — hence 3.5 rather than DSH's own flat 4
characters per token.