Introduction¶
When DeepSeek Harness (DSH) handles long tasks or high-frequency code refactoring, intermediate reasoning and tool calls can occupy a large amount of screen space. This makes it difficult to read the core conclusions and interact with the input area, and the reading rhythm is easily interrupted.
dsh-thought-fold is a plugin designed to solve this problem. It folds long processes, tidies up interrupted states, and provides a floating collapse button that follows along, making long conversations easier to read while maintaining data integrity and zero instruction intrusion.
Plugin Overview¶
The plugin is maintained by new-Beginner, belongs to the client-side category, and uses the MIT License. It does not inject model prompts, does not rewrite message DOM or break React node lifecycle, and runs solely as a UI enhancement layer.
Core Features¶
-
Intelligent Collapsing of Long Processes
By default, automatically collapses completed reasoning and tool calls. User messages, final answers, and key status prompts remain fully preserved. It also automatically takes effect when loading old sessions or historical delayed backfills. When details are needed, expand with one click. -
Codex Two-Level Folding
While running, normal content continues to display in real time, and by default there is only one “Process” entry between sections of normal content. Non-content processes such as native reasoning summaries, tool calls, and context are uniformly collapsed by default. After expanding long content, it is height-limited by default and can scroll internally. -
Safe Organization of Interrupted Processes
When a task is manually stopped, errors, or hits a length limit, the plugin automatically tidies up finished process content, fully preserves the last valid content card output before the interruption and the error state, avoiding misjudging network waiting or retries. -
Dual-Point Collapse and Floating Companion
A “Collapse Process” button is provided at the bottom of expanded processes. When a long process is obscured by the input box, the single floating collapse button adaptively docks above the input area. Multiple expanded rounds do not conflict with each other. -
State Persistence and Full Recoverability
Page re-rendering and window resizing do not disrupt the user’s manually expanded selections. Switching between native compact and standard modes preserves selection state in both directions. Disabling the plugin immediately removes all display modifications, leaving zero residue. -
Pure UI Enhancement, Zero Instruction Intrusion
It does not inject any System Prompt into the model and fully follows the model’s original behavior. It only uses safe CSS markers and local session-scoped observation, and does not scandocument.body.
Installation and Activation¶
Run the following command in a terminal to install the plugin (desktop client example):
dsh plugin --profile desktop add github:new-Beginner/dsh-thought-fold
After installation is complete, restart DeepSeek Harness to activate it.
Configuration and Usage¶
Settings Panel¶
The plugin injects a dedicated management page into DeepSeek Harness’s settings center. You can directly control the plugin, visual enhancements, and default folding states for reasoning and tools.
Configuration Items¶
Configure via settings.yaml or the settings panel; the following options are supported:
dsh-thought-fold:
enabled: true # 启用插件核心功能
showLiveHud: true # 开启视觉增强样式
foldReasoning: true # 默认收起思考(包括原生思考摘要)
foldTools: true # 默认收起工具、上下文等其他非正文过程
foldStyle: codex # 按钮外观风格:codex | minimal | clean
Shortcut Commands¶
You can directly use slash commands in the input box to control it:
/fold status: View the plugin’s current enabled status, HUD style, and appearance mode./fold toggle: One-click toggle for enabling or disabling the plugin./fold help: View command help.
Technical Details and Quality¶
- Environment requirements: Requires Node.js >= 20.0.0.
- Architecture design: Uses session-slot mounting and does not break React node lifecycle.
- Test coverage: Includes 26 Node.js tests (covering completion-state overall envelope judgment, asynchronous settings lifecycle, etc.) and 42 real Edge browser tests (covering real React 18 node mounting, streaming exposure and accurate timing, etc.).
- Searchable hiding: Compatible folding uses the
hidden="until-found"mechanism, so collapsed content still supports native browserCtrl + Fsearch.
Use Cases and Notes¶
This plugin is suitable for scenarios involving long tasks, high-frequency code refactoring, or multi-turn tool calls. Before use, confirm that the plugin runs with the current DSH process permissions, and it is recommended to inspect the source code and license.
Conclusion¶
dsh-thought-fold provides a restrained and fully recoverable folding solution for reasoning and tool processes. By optimizing at the UI level, it resolves the difficulty of reading long conversations while maintaining low coupling with the host system.