dsh-think-flow: Read the Chain of Thought clearly in the DSH right sidebar.

Preface

When running agents with DeepSeek Harness (DSH), the main conversation interface typically only displays the final answer and tool trajectory, while the model’s chain-of-thought reasoning is often buried in the event stream. For debugging questions like “why did it take a detour, where did it get stuck, what is a particular tool waiting for,” the lack of this visualization layer significantly increases debugging costs.

Rendering every reasoning event emitted by the host one by one is also impractical: a set of measured data from the README shows that a single turn can reach 53 steps, approximately 1550 seconds, with reasoning content around 71,000 characters and 68 tool calls; reasoning can generate hundreds of events per second, and redrawing per event would turn the panel into a slideshow.

Below we introduce the community client plugin dsh-think-flow (maintainer yfwu2020): it adds a “Chain of Thought” tab to the right sidebar of DSH Web, aggregating real-time reasoning into a readable structure organized as turn → step → (reasoning text + tool calls), and distinguishes between “thinking” and “waiting for external tools.”

What Is This

One-line positioning: DSH chain-of-thought visualization—collapses and displays the model’s real-time reasoning by turns, steps, reasoning text, and tool calls, providing a directory, summaries, and optional Chinese machine translation in the right sidebar.

Core Features

Aggregating by step instead of refreshing per event

The host side folds by step and merges pushes via sseThrottleMs (default 120ms) to prevent high-frequency reasoning events from overwhelming the UI. The configuration documentation explicitly advises against setting sseThrottleMs to 0.

Hierarchical collapsing and turn windows

Long turns (e.g., 53 steps) are not all expanded by default: similar activities are merged into phase blocks; by default only the latest turn is expanded, and within that turn only the current phase; earlier turns are collapsed into one line and can be clicked open when needed. The turn that was “watched in real-time” during generation will not automatically collapse, preventing you from being pushed out of place while reading.

The body side keeps the most recent 20 turns resident by default (maxTurnsPerSession); earlier turns are retrieved on demand via the full-turn directory. The directory skeleton records up to 2000 turns (maxIndexTurns), avoiding the need to stuff hundreds of turns of body text into memory at once.

Explicitly marking “waiting for tools”

Long periods of zero output may occur between two steps (the README gives an example: approximately 47 seconds during web search). The panel highlights such waiting periods with blocks like web_search executing · waited 23s to distinguish them from the interface freezing.

Turn summaries and step details

After a turn ends, you can see the number of steps, reasoning tokens, tool call count, and a rough distribution of reasoning time across phases such as reading code, running commands, modifying files, external searches, asking the user, etc.

When expanding a step, the order is generally: model title → secondary title derived from tool parameters → tool details → reasoning text fetched on demand (and answer body). Tool failures are displayed according to the host’s determination (isError + error.code), with error reasons following below the corresponding tool row.

Integration with main conversation trajectory

Clicking the #N before a step row in the chain-of-thought panel, when the main conversation is on the “Trajectory” page, jumps to the corresponding assistant row and selects that step (the host identity carries (turn, step)).

Chinese reasoning (machine translation, optional)

When reasoning text is mostly in English, the “中文” button in the header toggles between off → on → realtime → off: “realtime” translates as it streams by default; “on” only translates a step when it is expanded; “off” does not initiate translation requests. Translation uses the official translator service (Bing / Google anonymous endpoints) and does not consume model calls; the host needs to have @deepseek-ai/dsh-experimental-translator installed (installing @deepseek-ai/dsh-experimental-cot-translation-bundle will include it). Paragraphs are sent to third-party endpoints; if you do not want external transmission, keep it at “off.”

Installation and Activation

DSH runtime requires >= 0.1.7-rc (see peerDependencies in package.json). After installation, you need to restart dsh web and hard-refresh the browser (Cmd/Ctrl+Shift+R); afterwards, client-side changes can be hot-replaced by client-hmr.

Installation from npm is recommended:

dsh plugin --profile web add @yfwu2020/dsh-think-flow

You can also install from a tgz in GitHub Releases (same artifact as npm) or from a local development directory:

dsh plugin --profile web add /path/to/yfwu2020-dsh-think-flow-0.3.2.tgz

dsh plugin --profile web add link:/path/to/dsh-think-flow

After installation, typical locations include: the dependency entry in ~/.dsh/profiles/web/package.json, the package under node_modules, and references by package name in the profile’s dsh.profile.bundles.

How to open: the zigzag icon in the session header, or “Chain of Thought” on the right sidebar tab bar.

Typical Usage

Viewing structure vs. viewing raw text

The panel header can toggle between “View Structure | View Raw”; in real-time scenarios it defaults to “View Raw,” and switching to “View Structure” expands the current turn’s phase view.

Checking historical turns

Double-click the second-line title to enter the full-turn directory (local search supported); or use ‹ › on either side of the turn number to switch between adjacent turns.

Seeing what a step is waiting for

Hover over a step row to view complete tool information, machine-readable codes, and failure reasons.

Adjusting resident turns and memory strategy

Find the entry with id: think-flow in the profile’s cordis.patch.yml, and override its config (do not use insert to duplicate):

- id: think-flow
  config:
    maxTurnsPerSession: 20

Meanings of common keys (see README for the full table):

Key Default Meaning
maxTurnsPerSession 20 How many turns stay resident in the body window per session (0 = unlimited; the directory can still view more turn skeletons)
maxIndexTurns 2000 Maximum number of turn skeletons recorded in the full-turn directory
coldTtlMs / maxColdChars 7200000 / 4000000 Cold-turn body text retrieved on demand: idle TTL and character hard limit, two independent policies, whichever triggers first
sseThrottleMs 120 Minimum interval for SSE merged pushes

The title cache defaults to ~/.dsh/think-flow/titles.json, and the translation cache to ~/.dsh/think-flow/translations.json; uninstalling the plugin will not delete these files, and they can be reused after reinstallation.

Use Cases and Caveats

Who it’s for

  • Developers debugging complex agents in DSH Web who need to correlate reasoning with tool call ordering.
  • Long conversations, multi-turn, multi-tool tasks that require directory backtracking and “waiting for tools” state visibility.
  • Teams that want to optionally machine-translate English CoT paragraphs into Chinese and accept third-party translation endpoints.

Recommendations before installation

  • The plugin runs with the same permissions as the DSH process and subscribes to conversation trajectories and SSE; before installation, read the repository source code and LICENSE to confirm it meets your security and compliance requirements.
  • Some @deepseek-ai/* packages on npm may have outdated latest versions; when building from source, install according to the pinned versions in each package’s package.json, and do not blindly use latest.
  • The community directory skillhub.cn has no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem philosophy is “everything is a plugin,” and this plugin is a community-maintained client extension.

Conclusion

dsh-think-flow solves the problem of “the chain of thought exists, but the main interface is unreadable”: through step aggregation, hierarchical collapsing, explicit waiting-for-tools indication, and a full-turn directory, it turns turn-level reasoning into an operable view in the right sidebar. For installation commands, configuration options, and interface behavior details, refer to the README.

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

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

Xiaoye