dsh-reasoning-only-guard
Keeps one reasoning-only turn from making an entire session unusable. When a turn produces no visible text and no tool call, the assistant message is persisted empty, the gateway then rejects every later request in that session with 'content or tool_calls must be set', and the session is dead with no way back through chat. This plugin registers a single llm/stream waterfall listener and, only when the turn carried nothing visible, injects a small text block immediately before the terminal finish, so the persisted message is never empty. Ships the fixture DSH's own mock cannot express (a strictly reasoning-only SSE server, since llm-mock-server forbids an empty successText and always appends text after reasoning), plus an end-to-end reproduction that replays a real persisted session through DSH's own serializeMessages. Preventive, not a repair. Zero dependencies, one file, no process or filesystem access.
防止「只有推理、没有正文」的一轮把整个会话变成不可用。某一轮没有可见文本也没有 tool-call 时,assistant 消息会以空内容落盘,此后该会话的每一次请求都会被网关以 "content or tool_calls must be set" 拒绝,会话彻底死亡且无法再从对话里找回。本插件只注册一个 llm/stream waterfall 监听器,且仅当这一轮没有任何可见产出时,在终止 finish 之前注入一小段文本,使落盘消息永远不为空。附带 DSH 自带 mock 造不出的夹具(严格只有推理的 SSE 服务,因为 llm-mock-server 不允许空 successText,且 reasoning_success 总会再补一段正文),以及把真实落盘会话经 DSH 自己的 serializeMessages 重放的端到端复现。属预防而非修复。零依赖、单文件、不访问进程与文件系统。
How to install
dsh plugin add github:apex-mochen/dsh-reasoning-only-guard About
dsh-reasoning-only-guard **Stops a reasoning-only turn from bricking a session.** If a turn produces no visible text and no tool call, this plugin injects a small text block so the assistant message that gets persisted is never empty. The failure it prevents When a model answers entirely inside its reasoning channel, the turn has no text and no tool call. The assistant message is then persisted with empty content, and **every later turn of that session replays it**. A gateway rejects an assistant message with neither content nor tool_calls (content or tool_calls must be set) — so from that poi…
Recommendation signals
Meta
- License
- MIT
- Language
- JavaScript
- GitHub stars
- 0
- mo. downloads
- –
- Last push
- 2026-09-15
- Created
- 2026-09-15
Links
Basic safety check
- Findings
- curated 收录但无 npm 包/安装命令
- Sources
- curated:awesome-dsh-plugin.com, curated:awesome-dsh-plugin/awesome-dsh-plugin
Related plugins
DSH-EasyRewrite
Renzic-Stone/DSH-EasyRewrite
Inline-edit and recall your own user messages in dsh web — lazily and seamlessly, with a version pager and per-session draft persistence.
dsh-synapse
liangmianya/dsh-synapse
Visual, non-linear conversation workspace for DeepSeek Harness — sessions, follow-ups and branches become a browsable conversation map.
dsh-claude-move
PerryLink/dsh-claude-move
Four-source migration wizard: move Claude Code, Codex, OpenCode and Hermes sessions, memories, skills, instructions and slash commands into DSH (/move wizard with approval gate and idempotent move.json, resumable sessions).
dsh-web
zhu1090093659/dsh-web-ui/tree/main/packages/dsh-chat-recovery
Chat recovery for DSH: edit the last finished user message and explicitly retry failed turns, both via session-fork branches that leave the original conversation untouched.