HuanLinOTO/dsh-plugin-merge-tool-calls
将 WebUI 会话流中连续相邻的同工具调用合并为「主卡片+紧凑子行」树状展示,默认覆盖所有内置通用行工具
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness (DSH). It changes how tool calls are displayed in the DSH WebUI by merging consecutive adjacent calls of the same tool or tool family into a single tree view with a main card and compact child rows. It reduces the vertical space occupied by multiple tool cards when you repeatedly read files, search the web, edit code, or run shell commands. It covers all of DSH’s built-in general-purpose tools by default, and lets users configure a custom whitelist of tools to merge if they want more control.
After merging, the main card only shows the tool name and a summary of how many calls are included. All specific call details, like file paths for read calls, are moved to child rows that are collapsed by default. Clicking the main card toggles the expansion and collapse of all child rows with a smooth animation, and single unmerged calls retain their original display behavior. This plugin only modifies the presentation layer, so it does not change session logs, model-visible data, or detail panels, and the merged output is always consistent for a given chat snapshot when you replay the conversation.
Users can install this plugin directly via the DSH CLI from any DSH profile, with two supported distribution channels: GitHub source and the public npm registry. After installation, you need to restart the DSH web process and hard refresh your browser with Ctrl+Shift+R for the plugin to take effect. The plugin requires a browser that supports the :has() CSS selector, which includes Chrome 105+, Safari 15.4+, and Firefox 121+. Older browsers that do not support this feature will automatically fall back to normal spacing, so no broken interface will occur.
这是一个专为 DeepSeek Harness (DSH) 开发的原生插件,功能是将 WebUI 会话流中连续相邻的同工具调用合并为「主卡片 + 紧凑子行」的树状展示,减少连续读文件、搜索、编辑或执行命令时多条工具卡片对流式界面的占据。插件默认覆盖所有 DSH 内置通用行工具,同时也支持用户自定义配置需要合并的工具白名单,灵活适配不同使用需求。
合并后主卡片只显示工具名和调用数量摘要,具体调用路径信息都下沉到默认折叠的子行,点击主卡片即可展开或收起所有子行,单次未合并的调用保持原有显示行为不改变。插件仅做展示层的合并,不会影响会话日志、模型可见数据和详情面板,合并结果完全由聊天快照决定,回放结果稳定可预期。
用户可通过 DSH CLI 直接安装该插件,支持从 GitHub 源码或 npm registry 两种分发渠道安装,安装后需要重启 DSH Web 进程并硬刷新浏览器生效。插件要求浏览器支持 :has() 选择器(Chrome 105+/Safari 15.4+/Firefox 121+),不支持的浏览器会自动退化为正常行间距,不会造成界面异常。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-plugin-merge-tool-calls(HuanLinOTO/dsh-plugin-merge-tool-calls)
仓库:https://github.com/HuanLinOTO/dsh-plugin-merge-tool-calls
本站详情页:https://www.yhbd.top/plugins/huanlinoto-dsh-plugin-merge-tool-calls/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 7 · 最近提交 2026-09-30 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- Only 7 stars - very few users, little community feedback星标只有 7,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add "@huanlin/dsh-plugin-merge-tool-calls"
把 HuanLinOTO/dsh-plugin-merge-tool-calls 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-plugin-merge-tool-calls
把 WebUI 会话流中连续相邻的同工具调用合并为一个「主卡片 + 紧凑子行」的树状展示,减少连续读文件/搜索/编辑/执行命令时多条卡片对流的占据。默认覆盖所有内置通用行工具(read/grep/glob/edit/write/bash/pwsh/web_search/web_fetch/run_code),也可配置白名单。
合并前: 合并后:
[Read] foo ▸ 内容 [Read] · 3 Files ▸(点击展开子行)
[Read] bar ▸ 内容 └ foo(子行,点击展开 foo 的内容)
[Read] baz ▸ 内容 └ bar(子行,点击展开 bar 的内容)
└ baz(子行,点击展开 baz 的内容)
主行只显示数量摘要(Read · 3 Files),具体文件路径全部下沉到子行;子行默认折叠,点击主行以动画展开/收起。单次调用(无合并)保持原行为(主行直接显示路径并展开内容)。
纯展示层合并:会话日志、模型可见数据、详情面板均不受影响;回放确定(合并结果是聊天快照的纯函数)。
工作原理
- 通过 keyed slot
tool.call.toolview的 shadow 机制(priority: -1,最低者渲染)接管工具的卡片;tools: []时接管全部内置通用行工具(见src/client/tool-names.ts),非空列表为显式白名单(任意 wire 名均可)。 - 组件经
useChat读取聊天快照,在 order + node store 中按 call id 定位自身节点,前后扫描连续调用,按maxGroupSize分组。一组只合并同名或同家族调用:同名必合;已知家族(grep+glob、bash+pwsh、read+web_fetch)跨名合;未知工具名(variantothers)仅与自身合,不相关的工具不会混进同一张卡。 - 组首座位渲染合并卡片;组内其余座位渲染
null,由注入的样式规则[data-chat-flow-kind="tool-call"]:has([data-slot="tool.call.toolview"]:empty) { display: none; }将其从流中收起(与内置.flowItem:empty语义一致;渲染器为每个 toolview 包一层data-slot容器,故以该容器判空)。 - 主卡片镜像内置 ToolRow 的行面:按 variant 渲染标题/图标(Read/Search/Bash/Write/Edit/Code/
Tool call,工具自定义标题如Pwsh/Inspect优先)。合并组的主行摘要改为数量(Read · 5 Files/Search · 3 Queries/Bash · 4 Commands等,按 variant 选名词),不再显示首个调用的路径;单次调用(无合并)仍显示 args 摘要(读→路径、搜索→query、bash→description/command、未知工具带工具名 ·前缀),read/write/edit单行的摘要是可点击文件链接。行状态、错误首行、bash 失败退出码转红点均与内置一致。 - 子行紧凑(20px 高),结构为主行的尾部(
sep 点 + 路径)。合并组内所有调用(含首个)均渲染为子行,所以每个文件路径都在子行上。对齐运行时自动测量:组件挂载后量取主行 sep 点相对卡片的偏移(并用 ResizeObserver 跟随字体/布局变化),以--mtc-sep-left自定义属性设置子行缩进——sep 点与主行 sep 点同列、路径与主行摘要同列,不依赖任何手工字体宽度常量,任意工具名均自动对齐。展开的子行卡片以负向calc抵消该缩进,左边缘与主卡片内容区对齐(占满卡片宽度,左侧不留白)。无可展开内容(如运行中的 read)的子行渲染为静态行。 - 子行默认折叠:主行点击展开时,子行块以
grid-template-rows: 0fr → 1fr+ 透明度过渡动画滑出(200ms),收起时反向滑回;折叠期间子行仍在 DOM 中(grid 0fr +overflow: hidden收起,不卸载),所以动画平滑无闪烁。每个子行仍可独立点击展开其内容卡片。
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
vibeinging/dsh-desktop
chokwinlee/deepseek-harness-desktop
ZSeven-W/dsh-android
robiteame/dsh-session-tree-extension
baihejiangnan/dsh-session-context-menu
chromoany/dsh-notify-me
wallpap/dsh-compact-activity
2nd1st/dsh-plugin-open-app