← Back to home@Iwwww

dsh-reasoning-fold

Codex-style folding for the DeepSeek Harness web transcript: a running turn keeps only its last few actions visible, folded behind one row that opens the whole turn.

Stars
0
Language
JavaScript
Created
Sep 17, 2026
Updated
Sep 17, 2026

Introduction

dsh-reasoning-fold

Codex-style folding for the DeepSeek Harness web transcript: while a Turn runs, only its last few actions stay visible, and the bursts of work between its messages each stay behind their own row, which opens with a click.

A running Turn folded behind its summary row

The same Turn opened from the summary row

What it does

  • The window slides as the agent works. The newest 3 actions stay on screen — a tool call, a Context row, a retry, or one reasoning disclosure — and every finished burst folds behind a row that reads as a duration: Worked 42s · 17 earlier actions.
  • A finished Turn stays folded, one row per burst of work. A burst is a run of actions that no model message and no user input interrupts, so a Turn that reports between steps folds once per stage. That matters where DSH's own Compact fold stands down — while older history is still available through Load earlier — and there the finished Turn would otherwise stay fully expanded.
  • Where the shipped fold does own a Turn, it is left completely alone: no second fold, no second control.
  • Assistant prose is never hidden. A step whose body is reasoning and nothing else folds as one box; a step that also carries text keeps the text and folds only its reasoning row.
  • Nothing else is a unit. Only tool-call, context, model-retry and reasoning rows fold, so an error, a max-token notice or any unknown node kind stays exactly as shipped.
  • It never moves the reader. The plugin does not read or write scrollTop, anchors nothing and hooks no find-in-page; a hidden unit is display: none, so the transcript closes up by itself.

Install

dsh plugin --profile web add dsh-reasoning-fold

Reload the page afterwards. From a checkout: npm install && dsh plugin --profile web add link:$PWD.

Settings

Settings → General → Fold steps: Off / 1 / 3 / 5 / 10 (default 3), stored in the Host settings document under the reasoning-fold namespace.

Development

Node 22 or newer, plus a dsh binary (DSH_BIN), the zstd CLI, playwright-core (PLAYWRIGHT_CORE) and Chromium (CHROMIUM) for the browser tools.

npm run check    # manifest, dictionaries and the pinned DOM contract
npm run smoke    # planner suite plus the real web client on a throwaway fixture home
npm run previews # rebuilds docs/*.png from that fixture

MIT — see LICENSE.