Skip to main content

How to use dsh-auto-collapse

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

This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.

This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.

Quick start

dsh-auto-collapse

— source: plugin_wiki.wiki_content

Install & verify

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

Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.

— source: plugins.install

Key points

  • 回合完成自动收起(一级):每个回合完成后,工作过程收成一行 已处理 X秒,只留模型最终正文;点击展开完整工作流程(上下文注入 → 思考 → 工具调用 → 过程正文 → 最终正文)。
  • 二级折叠行:展开一级后,工具调用组与思考块各自折叠成一行 chip(正在运行 {命令} / 运行了命令 / 已思考),点击展开/收起;相邻工具组合并,正文输出是硬边界(不会跨正文合并)。
  • 三级思考合并:展开 已思考 后,连续思考合并为一个三级思考行(标题 Think · 第一句),点击展开合并内容块;原始四级行不出现。
  • 原生视觉对齐:图标盒 16px / glyph 14px / 行高 24px / 行距 16px,颜色使用 DSH 原生 token(--dsw-alias-label-*),思考与命令图标取自 DSH 原生图标(IconThinkOutline14 / IconApiOutline14)。
  • 流式友好:同一个 assistant-step 原地补正文、React 换节点和历史乱序挂载都会重新协调;running 状态带文字平滑呼吸动画,prefers-reduced-motion 下停止动画。

— source: plugin_wiki.readme_en (fallback readme_raw)

FAQ

Does it require any configuration after installation?

No configuration required. The plugin is a pure DOM-layer UI enhancement that does not read any environment variables, register any configuration items, or register any slot keys. After installation, simply restart the DSH Web service and hard refresh the page (Ctrl+Shift+R) to take effect.

Will it modify my message content?

No. The plugin only controls the display and visibility of work-in-progress elements (tool cards, thinking blocks, running status text), does not modify the message body generated by the model, and does not modify any official slot registrations.

Will the page return to normal after uninstalling the plugin?

It will fully restore. stop() will revert all rewritten displays, delete inserted collapsible rows, change "Deep sleeping..." back to "Deep diving...", and clean up all MutationObserver and rAF timers, leaving the host page DOM exactly as it was before uninstallation.

Does it conflict with official React rendering?

No conflict. The plugin does not 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 mounts will all automatically follow.

Will it affect animations and accessibility experience?

Running breathing animations will automatically stop when the user's system has prefers-reduced-motion enabled; collapsible rows use native DSH color tokens and automatically adapt to light/dark themes.

Which work node types are supported?

Top-level tool-call, command, manual-compaction, context (context injection), thinking (reasoning blocks), and pure image finals are all treated as the same turn semantics; adjacent tools are merged, and the body text is a hard boundary (will not merge across body text).

— source: plugin_wiki.faq_json

Compatibility

  • DSH: 未声明
  • Node: 未声明
  • Platforms: 跨平台

— source: plugin_wiki.compatibility_json

Pitfalls

Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.

— source: general rule