mervyn-teo/dsh-plugin-collapsible-steps

把消息之间连续的工具调用与思考步骤折叠成单个可展开的括号条目。

Bundle 已验证 MIT JavaScript 未知
Bundle 已验证

已收录

0

Ui

Bundle 已验证

版本未知
语言JavaScript
许可证MIT
在 GitHub 查看

预览

第 1 个预览,共 2 个:mervyn-teo/dsh-plugin-collapsible-steps
第 2 个预览,共 2 个:mervyn-teo/dsh-plugin-collapsible-steps

功能介绍

把消息之间连续的工具调用与思考步骤折叠成单个可展开的括号条目。

适合

  • 会话中经常出现大量连续工具调用、命令或思考步骤的 DSH Web 用户。
  • 希望压缩会话记录,同时保留最新步骤可见并可随时展开全部步骤的用户。
  • 希望继续使用 DSH 原生会话卡片与 Markdown 渲染的团队。

不适合

  • 未挂载基础会话 UI 的 DSH 环境。
  • 很少出现连续可折叠步骤的会话,此时分组价值有限。
  • 需要删除、总结或重新渲染步骤,而不只是折叠与展开的用户。

README

dsh-plugin-collapsible-steps

dsh-plugin-collapsible-steps banner — fold consecutive tool & thinking steps into one bracket

English 中文

A DeepSeek Harness (DSH) Web plugin that folds every run of consecutive collapsible-card steps between messages into a single + N steps row. Click the row to collapse the run (hiding all but the most recent step) or expand it back. The shipped conversation cards and markdown answers are left untouched — the rows are annotated, never replaced.

What it does

  • Adds a Collapse steps / Expand steps control to the session header, and a - N steps row before every run of consecutive step nodes.
  • Collapsing a row hides that run’s rows (display: none, so no empty gaps are left behind) except the most recent one, which stays below the + N steps text; clicking + expands the run back.
  • A “step” is any collapsible-card row — tool-call, workflow-run, command, command-input, compaction, context (context injection), manual-compaction, model-retry, and an assistant message’s Think (reasoning) disclosure. The final text answer, user/steering messages, and turn notices act as group boundaries.
  • The regular tool cards, reasoning sections, and markdown answer rendering all remain the shipped DSH ones.
  • A Collapsible steps card under Settings → Plugins controls whether runs are collapsed by default.

Settings

The plugin registers a collapsible-steps settings namespace with one option:

  • collapseByDefault (boolean, default true) — collapse runs of steps by default. Turn it off to keep runs expanded until you collapse them manually.

How it works

The slot system gives a plugin no way to wrap the shipped conversation cards, so instead of replacing the step renderers this plugin annotates the shipped DOM: it reads the conversation node order through the session hook, computes the runs of consecutive steps, and inserts the bracket headers directly into the existing flow (the node rows themselves are never moved, so the shipped view keeps reconciling normally).

Files

File Purpose
lib/client.js Browser half — the header control, bracket insertion, collapse state, and the settings card.
lib/index.js Host half — registers the collapsible-steps settings namespace.
lib/invariant.js Invariant registration.
cordis.patch.yml Composition patch that inserts the plugin row and its default config.
package.json Package metadata (dsh.bundle + dsh.client manifest).

Install

dsh plugin --profile web add github:mervyn-teo/dsh-plugin-collapsible-steps

Then restart dsh web — host bundles load at boot.

Requirements

  • DSH with the base conversation UI (@deepseek-ai/dsh-client-ui-conversation) mounted — the plugin inserts brackets into its chat flow.

License

MIT

常见问题常见问题

在启用了 DSH 的终端中执行已验证命令 dsh plugin --profile default add github:mervyn-teo/dsh-plugin-collapsible-steps。命令会解析公开 package 元数据,并保持插件与本页展示的目录身份一致。