NekoDD-wow/dsh-chain-toggle-all ↗★ 0
dsh-chain-toggle-all
DSH Web GUI: one-click expand/collapse all reasoning chains and tool chains in the current session (官方 repository-plugin 格式 / official bundle format)
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:NekoDD-wow/dsh-chain-toggle-all说明文档
阅读完整 README ↗dsh-chain-toggle-all
DSH Web GUI 一键展开/收起全部思维链与工具链
会话头部一个按钮:展开全部 Think 链 + 工具链,再点一下全部收起。
功能
- 在会话头部操作行新增「展开全部 / 收起全部」按钮
- 点击「展开全部」:当前会话内所有思维链(Think)与工具链(Tool call)一次性展开
- 点击「收起全部」:全部折叠回一行摘要
- 按钮文案随真实状态自动切换:手动展开/收起任意一条链,按钮文字也会跟着变(MutationObserver 监听
aria-expanded) - 会话内没有任何链时按钮自动隐藏,不占空间
安装
官方 bundle 插件 格式(仓库根 package.json 的 dsh.bundle + dsh.client)。经官方 profile 管理:
dsh plugin --profile web add "github:NekoDD-wow/dsh-chain-toggle-all" # git 源(推荐)
装完 重启 web(bundle 层在启动时合成),会话头部标题右侧即可看到按钮。
工作原理
思维链(ReasoningRow)与工具链(ToolRow)底层共用同一个 DisclosureRow 组件,每行带有:
data-disclosure-row— 行标记aria-expanded— 展开状态- 整行
role=button,点击即切换展开
插件扫描会话滚动容器([data-conversation-scroll])内的
[data-variant="think"] [data-disclosure-row], [data-tool] [data-disclosure-row],
确定目标状态(有任何折叠 → 全部展开;全部展开 → 全部收起)后对目标行执行 .click()。
纯前端实现:不修改 DSH 源码,不注入全局样式,插件卸载即完全还原。
开发
dsh-chain-toggle-all/
├── package.json # dsh.bundle.patch + dsh.client 元数据
├── cordis.patch.yml # profile 组合层插入行
└── .dsh-plugin/
├── package.json
├── index.mjs # host half(空 apply,占位)
└── client.js # browser half(__ModuleLoader__ bundle)
License
MIT