Streaming-transcript fold for the DSH web UI: thinking and tool rows fold away while the newest thinking window opens itself; a finished turn scrolls back to your question, which also stays pinned at the top while you read; blue sparks fly from the thinking window edge and the answer writing head.
Install
# from a prebuilt release tarball
dsh plugin --profile web add "https://github.com/rezon-aki/dsh-streamfold/releases/latest/download/dsh-streamfold.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:rezon-aki/dsh-streamfold
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
A better conversation window: the newest thinking window opens automatically while a turn runs, older windows fold themselves, and when the turn finishes the thinking and tool calls fold away — interleaved prose can stay unfolded. Water-like motion throughout.
Why this project exists: the official Compact mode stops folding when a session still has unloaded history; dsh-streamfold folds on its own terms and does not depend on whether history has finished loading.
- Peek at what dsh is thinking right now. The newest thinking window opens automatically while it works, and the transcript still stays tidy.
- Motion. We wanted an interface that simply feels good to look at: window height, folding and scroll-follow all advance per frame, like water — no jumps. The "back to bottom" button keeps the official look, but when it shows is decided here — normal follow lag no longer makes it flicker, and clicking it glides back smoothly.
- Sparks. Blue sparks rise from the bottom edge of the running thinking window, like a grinding wheel on metal: the faster the content scrolls, the brighter and denser they fly (brightness follows scroll speed — dim on slow output, hot on fast), and they stop when it stops. Colour and density are configurable; turning it off means it never runs.
- Forging. While the answer streams, every new chunk throws a small spray of sparks from the writing head (the end of the last line), drifting outwards like metal struck on an anvil. Written text only; pause and the hammer stops, and the sparks burn out on their own. Colour, density, speed and lifetime are configurable.
- Settle on the prompt. When a turn finishes the view glides back to the message that started it, so you never have to scroll up to remember what you asked (skipped if you scrolled away yourself; on by default, can be turned off).
- Pin the prompt. The prompt of the turn you are reading stays pinned to the top of the conversation, one line with an ellipsis; it steps aside while the real row is on screen, and clicking it glides back to that message (on by default, can be turned off).
Why it is light
- No separate view. It enhances the official transcript through semantic attributes instead of shipping its own conversation shell, taking over the render pipeline or depending on internal renderer contracts — a small upgrade surface.
- No dependencies, no build. Hand-written
lib/; the host half does one thing — persist settings to~/.dsh/streamfold.json. - No changes to DSH source; clean uninstall.
Install
# Two equivalent forms
dsh plugin --profile web add github:rezon-aki/dsh-streamfold
dsh plugin --profile web add https://github.com/rezon-aki/dsh-streamfold
Restart the profile, then refresh the browser page (client code is injected at page load).
Requires DSH >= 0.1.5-rc.2 (depends on that version's transcript DOM contract).
Uninstall:
dsh plugin --profile web remove dsh-streamfold
Usage
Settings → General → Conversation display → choose Fold (the third option, replacing the official row):
| Option | Behaviour |
|---|---|
| Standard | Official standard (all process rows visible) |
| Compact | Official compact |
| Fold | This plugin: one window for the running turn, the rest folds into one line |
Dedicated settings page: Settings → Streamfold (all switches below, applied immediately).
While running, only the newest thinking window opens automatically; windows you opened yourself are never auto-collapsed, and a superseded window folds back into a one-line summary after the "superseded grace" (2s by default). Scrolling up stops the follow, and a "↓ back to bottom" button appears once you are away from the bottom.
Settings
| Setting | Default | Meaning |
|---|---|---|
| Fold history turns | on | Off: do not fold past turns on page load (only while a turn runs) |
| Keep interleaved prose | off | Keep prose rows while folding and give them a capped window (the final answer is never wrapped) |
| Window height | 260 | Max height of a thinking / interleaved-prose window (px) |
| Auto-expand thinking while running | on | Only the newest block of the running turn; superseded windows fold after the grace period |
| Superseded grace | 2 s | How long an older window waits before folding into a summary line (0–60, decimals allowed) |
| Auto-expand tools while running | off | Expand the newest tool card using the official card's own disclosure/scroll |
| Auto-follow the bottom | on | Stick to the bottom while content grows; scrolling up stops it |
| Smoothing factor | 0.15 | Share of the remaining gap consumed per frame (0.05–0.9) |
| Minimum step | 1 | Minimum pixels advanced per 16 ms (refresh-rate independent) |
| Show "back to bottom" | on | Shown when away from the bottom (hidden for follow lag, to avoid flicker) |
| Settle on the prompt | on | When a turn finishes, glide back to your message that started it; if you scrolled away yourself, nothing moves |
| Pin the prompt | on | Keep the prompt of the turn you are reading pinned to the top of the conversation: it follows you as you scroll up, one line with ellipsis; it steps aside while the real row is in view, click to glide back to it |
| Animated transitions | on | Off makes folding / expanding / jumping instant |
| Window sparks | on | Sparks along the bottom edge of the running thinking window (standalone module: off = no canvas, no frames) |
| Spark colour | #4fa8ff | Spark colour; the core is brightened towards white heat |
| Spark density | 1 | Spark count multiplier (0.2–3): denser costs more to draw (shared by both spark kinds) |
| Forging sparks | on | Sparks thrown from the writing head while the answer streams; nothing new written, no hammer |
Settings live in browser localStorage and in the host file ~/.dsh/streamfold.json (route /streamfold/api/settings), so a remote Web UI can write them too.
Diagnostics
Browser console:
__dshStreamfold.stats() // window / fold / chip counts (incl. animation state)
__dshStreamfold.probe() // row state, still-visible thinking rows, window animation, jump button, spark cost (probe().sparks)
__dshStreamfold.state() // current settings + official "conversation display" snapshot
__dshStreamfold.set({ smoothGrow: 0.1, supersedeDelay: 3 })
When reporting an issue, attach the probe() output and your DSH version.
Safety
- Client-side presentation only: it reads the conversation DOM, makes no network requests, touches no credentials and never modifies DSH source.
- The host half only persists settings to
~/.dsh/streamfold.jsonbehind a same-origin route/streamfold/api/settings(cross-site requests get 403). - Clean uninstall: the settings row, window markers and injected styles are all removed.
Development
- Hand-written, no build:
lib/client.js(browser half, wrapped inwindow.__ModuleLoader__) andlib/index.js(host half). - After editing
lib/*.js, reload the plugin and refresh the page. - Row anchors use official semantic attributes only:
[data-chat-flow],[data-chat-flow-kind],[data-chat-turn],[data-disclosure-row][aria-expanded],[data-variant=think],[data-tool],[data-sample=bash],[class*=_thinkBody],[class*=_bodyWrap],[data-context-injection-body]— never CSS module hashes. - Verified on DSH 0.1.5-rc.2.
License
MIT
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 7971
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 7971
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
omdsh-dev/DSH-better-sidebar★ 3733
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
ccch1mneyyy/dsh-TUI★ 3169
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 3035
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
Devin-AXIS/deepseek-design#deepseek-idesign★ 1515
Visual design studio for websites, app prototypes, posters, cards, reports, and magazines, with templates, direct element editing, selection-aware AI draft handoff, and export.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.