Introduction

In the DSH (DeepSeek Harness) web interface, a single agent reply may simultaneously contain Think, tool calls, file reading, and command output. When the content is extensive, the interface becomes filled with process nodes, making it difficult to quickly locate the final summary.

dsh-turn-fold is a pure DSH plugin responsible only for “folding”: it collapses process steps into a step folding bar and the entire round of reply into a turn folding bar, while retaining manual expand/collapse capabilities. It is maintained by Winter-And-You-Gone, uses the MIT license, and does not modify any @deepseek-ai/dsh-* source code.

The DSH plugin ecosystem follows a community extension model; the relevant directories are independent sites with no official affiliation to DeepSeek or Matrix Factor, and should not be understood as an official app store.

What is this

  • Plugin Name: dsh-turn-fold
  • NPM Package Name: @winteries/dsh-turn-fold
  • Repository: https://github.com/Winter-And-You-Gone/dsh-turn-fold
  • License: MIT
  • Runtime Requirements: Node >=20.3, DSH Web profile
  • Core Functions: Auto-fold step grouping, running turn folding bar, full turn folding, manual expand/collapse

Core Features

Auto-fold step grouping

Tool calls and Think (including pure Think sections) between two text segments are collapsed into a single step folding bar by default.

During execution, the step folding bar dynamically displays the current action, such as the running tool name, parameter summary, or the current thinking content in Think; the text features a shimmer animation.

After the segment closes, the folding bar displays titles grouped by tool type, for example:

  • Ran pwsh
  • Read client.js
  • Edited index.js [ +12 -3 ]
  • Searched 2 times
  • Thought N times

If a command execution fails within the group, the title will be marked in red and the failure count will be appended.

Running turn folding bar

After sending a message, the turn folding bar appears. It displays in real-time:

  • Duration
  • First character
  • Token consumption
  • Tok/s
  • Cache hit rate
  • Steps pending to fold

The turn number is displayed on the right, for example Round x.

After the turn ends, the metrics switch to official authoritative values: tok/s from turn-tail and precise duration from turn/end.

Full turn folding

Once a round of reply is complete, the entire turn is also collapsed into a turn folding bar. When expanded, you can see the process content within this turn; the final summary only displays the body text.

The folding scope does not cross the user message; it will not fold content above the user message.

Manual and Interface

  • Manual expand/collapse of folding bars.
  • Pop up update notes once upon the first load of a new version.
  • Reuses the official DisclosureRow style, the folding bar has a permanent divider line below, and line height is kept compact.
  • Expand/collapse has a transition animation; it automatically degrades or disables when the system “Reduce motion” setting is enabled.
  • Interface text switches in real-time according to the DSH interface language, supporting Simplified Chinese / English.
  • The folding bar has aria-label / aria-expanded attributes and is keyboard operable.
  • Leading icon is customizable, with a built-in dynamic playing card.
  • Adapts to both new and old versions of DSH.

Installation and Enablement

npm Installation

First confirm the local Node version is >=20.3, then execute in the DSH Web profile:

dsh plugin --profile web add @winteries/dsh-turn-fold

You can also install from the GitHub source code:

dsh plugin --profile web add github:Winter-And-You-Gone/dsh-turn-fold

dsh plugin will add the package to the profile’s pnpm dependencies and automatically append it to the composite bundle layer dsh.profile.bundles.

Verify Configuration

Execute:

dsh --profile web --dump-config

Confirm that @winteries/dsh-turn-fold layer is visible in the output.

Restart DSH

After installation, completely exit the DSH process and restart, then open the Web interface to verify the folding bar effect.

Manual Installation

If you already have a local plugin directory, you can use a PowerShell script:

.\install.ps1 -PluginSource "<Your plugin directory>"

The script will:

  1. Create a Junction at ~/.dsh/profiles/node_modules/@winteries/dsh-turn-fold;
  2. Append insert registration to ~/.dsh/profiles/web/cordis.patch.yml;
  3. After completion, you also need to completely exit the DSH process and restart.

Typical Usage

  1. Start the DSH Web profile.
  2. Send a message that triggers Think or tool calls.
  3. After the message is sent, check the running turn folding bar to observe metrics like duration, first character, tokens, tok/s, cache hit rate, etc.
  4. Wait for this round of reply to complete, and check if the final summary body text is retained and if the process content has been collapsed into a turn folding bar.
  5. Click the folding bar to expand/collapse and check step titles, red failure indicators, icons, and divider lines.

If you want to run tests locally:

npm install
npm test

npm test runs all tests in tests/ using node --test.

Suitable Scenarios and Notes

Suitable for:

  • Using long round agent replies in the DSH Web interface.
  • Scenarios where you want to reduce the visual area occupied by Think, tool calls, and command output.
  • Scenarios where you want to keep the final summary body text visible while still being able to expand process nodes on demand.

Notes:

  • The plugin runs with the permissions of the current dsh process; you should check the source code and license before installing.
  • For new installations, use @winteries/dsh-turn-fold; the old package name dsh-turn-fold is still updated with every release.
  • Manual installation modifies the profile’s registration file; confirm the source before uninstalling or rolling back.
  • Uninstalling npm installed plugins:
dsh plugin --profile web remove @winteries/dsh-turn-fold

Conclusion

The value of dsh-turn-fold is specific: it folds the Think, tool calls, and turn metrics during DSH execution into expandable/collapsible bars, while keeping the final summary body text visible. It does not modify the DSH core package and is suitable as a folding enhancement plugin for the DSH Web interface.

Plugin catalog page: https://www.skillhub.cn/plugins/Winter-And-You-Gone/dsh-turn-fold
GitHub: https://github.com/Winter-And-You-Gone/dsh-turn-fold