The DeepSeek Harness (DSH) Web client has a built-in collapse feature, but it works only under specific conditions: the session is in compact view, the turn has a finalized answer, and the turn is closed with no earlier history (!historyIncomplete). When the conversation exceeds two or three exchanges or when clicking “Load earlier,” this condition is always true, causing the collapse feature to stop working and making the interface lengthy.
The dsh-fold-it-up plugin takes over the rendering logic for conversation.chat.node. Instead of relying on store snapshots, it directly reads attributes on DOM elements (such as data-chat-turn and data-turn-process-member) to determine the collapse state. It force-collapses the working process of all completed turns while keeping the answer visible.
Plugin Information¶
- Name: dsh-fold-it-up
- Category: Client plugin
- Author: gurio-wine
- License: MIT
- Core features:
- Force-collapses the working process of completed turns.
- Supports automatic collapsing for historical sessions and pages after clicking “Load earlier”.
- Automatically classifies and collapses context injection lines (such as
@deepseek-ai/dsh-system-prompt). - Handles turns with errors, context limits reached, or no answer.
Installation and Enablement¶
This plugin has no dependencies; the generated artifact can be used directly.
- Clone the repository to any local directory:
git clone https://github.com/gurio-wine/dsh-fold-it-up.git
- Add it to the Web profile (
webis the default profile name):
dsh plugin --profile web add <clone下来的目录>
- Refresh the page to activate it.
Typical Usage¶
- Open any session (including historical sessions and pages after clicking “Load earlier”), and all finished turns will automatically collapse into a single line.
- Click the collapsed line to expand or collapse it.
- Use browser search (Ctrl+F) to locate and expand collapsed content.
Use Cases and Notes¶
- Use cases: Long-session development and debugging; scenarios where context summaries need to be reviewed quickly.
- Dependency environment: The DSH runtime must satisfy Node.js >= 22.12.0.
- No build step: No build toolchain is required; generated artifacts such as
client.jsare already committed to the repository. - State persistence: The expanded state of collapsed content is not persisted; refreshing the page resets it to the collapsed state.
- Style reuse: Uses the official product’s built-in collapsed-line styles, with no additional CSS introduced.
Summary¶
dsh-fold-it-up fixes the issue where the official DSH collapse feature fails in long sessions and when loading history by using shadow rendering technology. A clean chat interface can be obtained with simple installation.