@ch4acko3/dsh-turn-fold: Turn Fold Plugin for DSH WebUI

Preface

In the DSH WebUI, a single response often consists of more than just a final piece of text. The model may produce thinking, notes, commands, and tool calls during the process, and there may also be context injections. As turns grow longer, this Agent activity can crowd the conversation space, making it harder to quickly locate the final answer.

dsh-turn-fold addresses this interface-level issue: it collapses the Agent activity of completed turns into a summary bar while keeping the final response visible.

What This Is

@ch4acko3/dsh-turn-fold is a DSH WebUI plugin maintained by CH4ACKO3, categorized as ui, and licensed under MIT.

Its core value is: adding Codex-Desktop-style turn folding to DSH WebUI conversations, collapsing the Agent activity of each completed turn into a summary bar while keeping the final response visible.

Core Features

The following capabilities have been verified:

  • Adds Codex-Desktop-style turn folding to DSH WebUI conversations.
  • The summary bar remains visible during folding, while native thinking, notes, commands, and tool calls continue streaming.
  • Moves known Agent activity, including context injection, into a disclosure placed before the final response.
  • The final answer is located via turn-tail.closing.finalNode rather than finish_reason or DOM position.
  • Folds completed, stopped, and interrupted turns, displaying distinct status labels.
  • Remains expanded when DSH marks closing branch unavailable, when nodes follow the closing answer, when within focus/text selection, on failure, max-token, closing-less, or open states.
  • When expanded, reuses the original native node renderers, preserving tool details, copy, and file links.
  • Registers English and Chinese dictionaries through DSH’s native locale service.
  • Operates via in-memory Source Patches, without modifying installed DSH files.
  • Configurable metrics default to wall time, tool-call count, and input/output tokens.

Installation and Enablement

First, install the plugin, then check the patch status.

dsh plugin --profile web add github:CH4ACKO3/dsh-turn-fold
dsh harmony status --profile web   # all three patches must be `bound`

The first command adds the plugin to the web profile; the second command confirms that the relevant Source Patches are bound. When all three patches show bound, the plugin is enabled as expected.

Typical Usage

  1. Complete a turn in the DSH WebUI and review the summary bar of the completed turn.
  2. To review the process, expand the disclosure to see the Agent activity before folding.
  3. Run tests in the local repository:
node test/run.cjs

Through the steps above, you can respectively inspect folding, expansion, status labels, and localization behavior.

Use Cases and Notes

  • Suitable for developers using the DSH WebUI who want to compress procedural information within completed turns.
  • Applies to @deepseek-ai/dsh-client-ui-conversation from 0.1.0-rc.8 up to, but not including, the 0.2.0 prerelease line.
  • Node requirement: ^22.22.3 || >=24.11.1.
  • The plugin runs with the current dsh process permissions; reviewing the source code and license before installation is recommended; this project’s license is MIT.
  • It operates via in-memory Source Patches, without modifying installed DSH files.
  • Selectors must match exactly once; incompatible compiled variants will fail closed.
  • Releases are published via Trusted Publishing (OIDC), without using long-lived npm tokens.

Conclusion

The value of dsh-turn-fold lies in containing the Agent activity of completed turns within a summary bar while preserving the final response, native streaming content, and original rendering details upon expansion. It is well-suited for scenarios focused on the DSH WebUI conversation experience and serves as a UI-type plugin within the DSH plugin ecosystem.

The table of contents link is not included in the verified materials. GitHub address: https://github.com/CH4ACKO3/dsh-turn-fold

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye