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

dsh-empty-turn-guard

将DSH空回合改判为可重试错误 适合需要防止DSH模型因输出空回复而静默停止,将其转为可重试错误的用户。

套件
dsh-empty-turn-guard
相容性
待驗證
版本
0.4.0
授權
MIT
最近更新
2026年10月23日

同名套件的其他儲存庫

安裝

$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.