Skip to main content

dsh-auto-collapse

36Stars2Forks2Issues0Watchers

Collapse tool cards and Think reasoning blocks in the DSH Web chat interface into single-line summaries, and rename "Deep diving" to "Deep sleeping".

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
License
MIT
Branch
main
cordisdeepseekdeepseek-harnessdshdsh-plugin

Install

cmdweb profile
$ dsh plugin --profile web add dsh-auto-collapse

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin a179-sanae/dsh-auto-collapse for me: review the repository at https://github.com/a179-sanae/dsh-auto-collapse first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-line Summary

A pure frontend DOM plugin that mounts on the DSH Web chat interface. It automatically collapses tool invocation cards and Think reasoning blocks within each turn into a single-line summary, while replacing the official "Deep diving..." status text with "Deep sleeping...", keeping only what the model says in the chat view.

Core Features

  • Turn auto-collapse (level 1): After a turn completes, the entire working process collapses into one line showing Processed Xs. Click to expand and see full context injection → thinking → tool invocation → process body → final response
  • Tool blocks and thinking blocks collapse into chips (level 2): After expanding level 1, tool groups and thinking blocks each collapse into a single chip line (displaying Running {command} while running, or Ran command / Thought after completion)
  • Continuous thinking merged into level 3 rows: Multiple adjacent thinking blocks merge into a single row titled "Think · First sentence", click to expand and see merged content, original level 4 rows won't appear
  • Real-time display of current work in collapsed state: Running chips display tool name + current command/path/query being executed, or the latest line of thinking
  • Replace "Deep diving" status text: Change the official ChatView running status line Deep diving... to Deep sleeping..., keep the streaming effect unchanged
  • Fully reversible: When the plugin is uninstalled (HMR stop), it restores all collapsed rows, hidden display properties, and rewritten status text; the host page DOM remains identical to before uninstallation

Technical Implementation

  • Language: TypeScript (target es2020)
  • Key Dependency: Only devDependency esbuild (for building), zero runtime dependencies
  • Architecture: Pure DOM layer with MutationObserver + requestAnimationFrame coordinator; host half is empty apply() for placement in cordis plugin tree; client half registers collapse controller via ctx.effect, cleaned up automatically by cordis on uninstall
  • Entry Files: src/client.ts (browser-side bundle entry, build output lib/client.js), src/index.ts (host half, no behavior)

Applicable Scenarios

When running multi-step tasks with the model on DSH Web (searching, writing files, running commands, complex reasoning), each round of tool invocations and thinking processes clutters the screen, making it difficult for those who only want the final conclusions. This plugin collapses intermediate processes into a single line, allowing users to expand and view details when needed. It's suitable for regular users who want the interface to "only show what the model says," as well as users engaged in lengthy discussions with the model who want to quickly scan what work was accomplished.

Prerequisites & Compatibility

DependencyMinimum VersionDescription
DSH Web clientNot declaredOnly runs as a dsh.client.platform="web" client plugin, requires mounting on DeepSeek Harness Web
Node.jsNot declaredRepository has no engines field; build/deploy scripts run in Node environment
BrowserModern browser (supports ES2020, MutationObserver, requestAnimationFrame)Plugin runs in browser DOM, no Node-only API dependencies
PlatformCross-platformUsed via DSH Web client, operating system independent
Native modulesNoneZero native dependencies, pure frontend implementation

Installation

dsh plugin --profile web add github:a179-sanae/dsh-auto-collapse

After installation, restart the DSH Web service (or trigger plugin HMR), then hard refresh the page with Ctrl+Shift+R to take effect. No additional configuration required.

Configuration

This plugin requires no additional configuration.

ConfigurationTypeDescriptionDefault Value

All behaviors (collapse timing, animation duration, text replacement rules) are hardcoded in the source code. No configuration options are exposed to users, no environment variables are read, and no slot keys are injected.

FAQ

Q: Does it require any configuration after installation?

A: No. The plugin is a pure DOM-layer UI enhancement. It reads no environment variables, exposes no configuration options, and registers no slot keys. After installation, simply restart the DSH Web service and hard refresh the page (Ctrl+Shift+R) to take effect.

Q: Will it modify my message content?

A: No. The plugin only controls the display and hiding of working processes (tool cards, thinking blocks, running status text). It does not modify the model's generated message content, nor does it modify any official slot registrations or data structures.

Q: Will the page return to normal after uninstalling the plugin?

A: Yes, it will be fully restored. The stop() function restores all rewritten display properties, deletes inserted collapsed rows, changes "Deep sleeping..." back to "Deep diving...", and cleans up all MutationObserver and rAF timers. The host page DOM remains identical to before uninstallation.

Q: Does it conflict with official React rendering?

A: No conflict. The plugin doesn't modify any React slots. It only uses MutationObserver to observe DOM changes and merges and replays them within requestAnimationFrame. React re-renders, node replacements, and out-of-order mounting of historical messages are all automatically tracked.

Q: Will it affect animations and accessibility experience?

A: The breathing animation during execution automatically stops when the user's system setting prefers-reduced-motion is enabled; collapsed row colors use DSH native label tokens, automatically adapting to light/dark themes.

Q: Which working node types are supported?

A: Top-level tool-call, command, manual-compaction, context (context injection), thinking (reasoning blocks), and pure image final are all handled with the same turn semantics; adjacent tools are merged, and the body is a hard boundary (won't merge across bodies).

Getting Started Difficulty

Beginner — Install with a single command, restart the service, refresh the page, and it's ready to use. No concepts or configurations need to be understood.

Known Issues & Limitations

  • Status text replacement is forced: Deep diving... is unconditionally changed to Deep sleeping... and cannot be disabled (even if users want to keep the original text); the plugin restores the original text by node when uninstalled
  • Only supports DSH Web client: Does not support other hosts like DSH CLI, desktop, or mobile clients (dsh.client.platform is declared as web)
  • Depends on host DOM contract: Recognition is based on stable data-* attributes hardcoded when ChatView renders (data-chat-flow / data-tool / data-state, etc.). If the official Web client DOM structure changes, the collapse feature may need adaptation

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/a179-sanae/dsh-auto-collapse)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory