dsh-turn-fold: Codex-Style Folding for DSH WebUI

Introduction

DeepSeek Harness (DSH) uses a plugin architecture to enable modular functional extensions. In WebUI conversations, interface content can become lengthy as the number of interaction turns increases. This plugin introduces a Codex-Desktop-style collapse mechanism, compressing the agent activity of each completed turn into a summary bar while keeping the final response visible, thereby maintaining a clean conversation interface.

Plugin Overview

  • Name: dsh-turn-fold
  • Purpose: Adds Codex-Desktop-style turn folding to DSH WebUI conversations
  • Maintainer: memorax-ai
  • License: MIT
  • Dependency: dsh-harmony

Core Features

  • Collapse mechanism: Automatically collapses completed, stopped, and interrupted turns. Each state has its own label. The collapsed summary bar displays wall-clock time, tool call count, and input/output token counts by default.
  • State retention: The plugin remembers the expanded/collapsed state for each session and specific turn.
  • Accessibility: Supports keyboard focus, status and action labels, responsive wrapping, and reduced motion handling.
  • Rendering reuse: When expanded, it reuses the original native node renderer to ensure tool details, copy functionality, and file links work correctly.
  • Smart expansion: Turns remain expanded when DSH marks a closed branch as unavailable, subsequent nodes are located after the closed answer, or the user has keyboard focus or a text selection within the active area, preventing errors or unfinished work from being hidden.

Installation and Enablement

Install the plugin into the Web profile via the CLI:

dsh plugin --profile web add github:memorax-ai/dsh-turn-fold

After installation, verify the status using the following command (ensure all three patches are bound):

dsh harmony status --profile web

Compatibility and Implementation

The plugin runs on dsh-harmony and modifies the compiled browser bundle through three in-memory Source Patches:

  1. inject-turn-fold-runtime: Injects the collapse renderer and disclosure UI into ChatView.
  2. rewrite-node-render-loop: Replaces the native node list seam for a specific version with a per-turn renderer.
  3. install-turn-fold-services: Registers the localization dictionary and binds the native settings scope.

Supported DSH version ranges:
* DSH 0.1.0-rc.8 through 0.1.7
* DSH 0.2.0-rc.2

Notes

  • Rendering behavior: Regardless of whether a turn is collapsed, DSH always renders the reasoning process, tool calls, and context information.
  • File modification: The plugin does not modify installed DSH files; native folding can be restored after uninstalling or disabling it.
  • Selector matching: Each selector must match exactly once; incompatible compiled shapes will cause the plugin to fail (fail closed).
  • Test coverage: Compatibility tests primarily cover Windows browser environments, including startup, persistence, and replay. They do not cover real model calls or browser interaction on macOS/Linux.

Summary

dsh-turn-fold improves the reading experience for long DSH WebUI conversations through its collapse mechanism, providing a Codex-style summary view. For more details, see the GitHub repository or the SkillHub directory.

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

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

Xiaoye