dsh-auto-stop
在达到输出上限前截断并由父代理继续 适合需要处理超长文本输出、避免因截断导致信息丢失的用户。
安裝
$
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.