FYTXY/dsh-empty-turn-guard ↗★ 0

dsh-empty-turn-guard

DSH 插件:把「只有协议标记、既没有正文也没有工具调用」的空回合改判成可重试的错误,避免模型回复输出一半就静默停住。A DSH plugin that turns a markup-only empty turn into a retryable EMPTY_RESPONSE error instead of a silently half-finished reply. 适合需要防止DSH模型因输出空回复而静默停止,将其转为可重试错误的用户。

Package
dsh-empty-turn-guard
Compatibility
Unverified
Version
0.4.0
License
MIT
Last updated
Oct 23, 2026

Other repositories with this package name

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:FYTXY/dsh-empty-turn-guard

Configuration

1. The switch

Both entry points write the same value — the package's entry in the profile's dsh.profile.bundles array — so either works:

Entry pointWhat it shows
Settings → Built-in plugins → Empty-turn guardThe plugin's own tab: the switch, what it currently does, and save / discard
Sidebar → Plugins panelThe same switch on the bundle's card

Turning it off unloads the plugin and restores the untouched llm/stream chain, which brings the silent half-turn back. Turning it on reloads the guard. Both take effect without reinstalling.

The row-level toggle for this plugin's row is greyed out on the Plugins panel. That is expected: DSH only enables or disables rows through the profile's own patch file, and this plugin's row comes from the bundle's own cordis.patch.yml. The bundle switch is the one that takes effect.

2. Disabling it without unloading

To keep the package installed but skip the interception, give the row a config:

- id: dsh-empty-turn-guard
  name: 'dsh-empty-turn-guard'
  config:
    enabled: false

enabled is a volatile field, so it arrives as a live reference rather than a frozen value; the guard re-reads it on every request and the settings switch applies to the next model call with no restart.

3. Verifying it is running

In the host log (%APPDATA%\DSH Desktop\logs\host\dsh-.log on Windows, ~/.config/DSH Desktop/logs/host/ on Linux):

[dsh-empty-turn-guard] empty-turn-guard: mounted (markup-only stops become EMPTY_RESPONSE retries)

And when a markup-only stop is actually caught:

[dsh-empty-turn-guard] rewriting an empty stop (text=24ch) into EMPTY_RESPONSE

An llm/retry / llm/retry-started event usually follows — that is the retry running.