跳到主内容

dsh-plugin-merge-tool-calls 使用指南

把 WebUI 会话流中连续相邻的同工具调用合并为「主卡片+紧凑子行」树状展示,默认覆盖所有内置通用行工具 | Merges consecutive same-tool calls in the WebUI chat flow into a main-card + compact-child-rows tree view, all built-in generic tools by default

本文为派生内容(基于 wiki / faq / compatibility_json 自动组装),非 AI 即时创作。

本文由本站基于该插件已收录的字段自动派生(wiki / faq / compatibility_json / readme),非 AI 即时创作。每节末尾标源字段。

快速上手

把 WebUI 会话流中连续相邻的同工具调用合并为「主卡片+紧凑子行」树状展示,默认覆盖所有内置通用行工具 | Merges consecutive same-tool calls in the WebUI chat flow into a main-card + compact-child-rows tree view, all built-in generic tools by default

— 源: plugins.ai_summary

安装与验证

dsh plugin --profile web add @huanlin/dsh-plugin-merge-tool-calls

复制以上命令在 DSH Web Profile 内运行。安装完成后在「插件列表」启用即可。

— 源: plugins.install

关键要点

  • 通过 keyed slot tool.call.toolview 的 shadow 机制(priority: -1,最低者渲染)接管工具的卡片;tools: [] 时接管全部内置通用行工具(见 src/client/tool-names.ts),非空列表为显式白名单(任意 wire 名均可)。
  • 组首座位渲染合并卡片;组内其余座位渲染 null,由注入的样式规则
  • 子行默认折叠:主行点击展开时,子行块以 grid-template-rows: 0fr → 1fr + 透明度过渡动画滑出(200ms),收起时反向滑回;折叠期间子行仍在 DOM 中(grid 0fr + overflow: hidden 收起,不卸载),所以动画平滑无闪烁。每个子行仍可独立点击展开其内容卡片。
  • pnpm run typecheck && pnpm test && pnpm run build 全绿;
  • git -C <dsh checkout> status 干净(零源码 patch);

— 源: plugin_wiki.readme_zh (fallback readme_raw)

踩坑提醒

安装前请审阅上游仓库;本指南基于已收录字段自动派生,可能滞后于最新版本。如发现与官方文档冲突,请以上游为准。

— 来源:通用规则