huangfuren/dsh-conversation ↗★ 2

dsh-conversation

Conversation outline panel for the DSH web surface: user questions (index, time, per-turn stats) as level-0 nodes with the assistant reply's Markdown headings hanging beneath them — level slider, search scope, bookmarks, copy/export, section jump, keyboard nav and reading-position memory. Read-only UI: it never touches prompts, messages, tool results or provider traffic, and it writes nothing outside its own localStorage keys.

套件
dsh-conversation
相容性
待驗證
Harness 依賴範圍
>=0.1.5-rc.2 <1.0.0 || >=0.2.0-rc.1 <1.0.0
版本
1.5.8
授權
MIT
最近更新
2026年11月13日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:huangfuren/dsh-conversation

dsh-conversation

中文 | English

Web 端「会话大纲」插件:在页面右上角贡献一个浮动面板,把当前会话组织成一棵大纲树 —— 用户提问是根节点(带序号、提问时间、该轮工具数与正文量),助手回复里的 Markdown 标题按其层级挂到最近的提问下。点击任意一行跳到正文并短暂高亮。纯 UI 插件,不接触任何提示词、消息、工具结果,也不向提供方发起请求。

Project status: 1.x。已在 dsh 0.1.5-rc.2 + web profile 上验证,并适配 dsh 0.2.x(>=0.2.0-rc.1 = 22.19 | | DSH | >= 0.1.5-rc.2 < 1.0.0(槽位名、slots.inject/register契约在 0.1.5-rc.2、0.2.0-rc.1、0.2.1-rc.5 上核对一致;实机验证:0.2.1-rc.5 桌面端) | | react | ^18.2.0(宿主提供) | | 界面 |web(dsh.client.platform`) | | 渲染引擎 | Chromium 111+(仅「背景透明度」需要;0.2.1-rc.5 实测 Electron 44.7.0 / Chromium 152) |

超出上表的组合未认证。

安装

优先用不可变 tag:

dsh plugin --profile web add github:huangfuren/dsh-conversation#v1.5.8

跟踪开发分支(需要尚未发布的最新提交时用这个):

dsh plugin --profile web add github:huangfuren/dsh-conversation

或指向本地 checkout:

dsh plugin --profile web add file:/absolute/path/to/dsh-conversation

package.json 已声明 dsh.bundle.patch(./cordis.patch.yml),由 dsh plugin add 自行维护组合。 若想手工插到 profile 的 cordis.patch.yml,等价写法是:

- insert:
    - id: conversation
      name: dsh-conversation

开发与测试

npm run check    # node --check 两个入口
npm test         # node --test
npm run verify   # check + test(已绑定 prepack,测试不过打不出包)

client.js 不是 ES 模块:dsh 客户端模块加载器按 window.__ModuleLoader__.load({ id, factory }) 加载它, factory 里的 require 只能解析宿主提供的外部模块(本插件只用到 react),相对路径依赖在真实加载器里 解析不了 —— 所以客户端保持自包含单文件(dsh-grafana 的 client.js 约 67 KB,同样如此)。 test/client.test.js 用最小加载器桩把它 load 进来,断言它导出的纯函数 internals; test/host-service.test.js 驱动 apply() 注册出来的槽位组件,锁定「宿主 slot props 为空时从 uiSession / sessions 服务取快照」以及服务缺失 / 恶意 props 的降级路径。 test/diagnostics.test.js 锁定 DOM 契约探测矩阵、快照形状矩阵,以及两类一次性日志「每次页面加载最多一条」的约定。

已知限制

  • 点击定位依赖宿主的 DOM 契约(data-chat-anchor-key / data-message-key / data-node-key 或 data-chat-flow-kind);若未来整体改属性,需在 locateByKey / collectUserRows 里追加新候选——插件会在首次渲染出大纲时探测一次,缺失时打一条 console.warn(见「兼容性 / 一次性兼容性诊断」)。
  • 服务路径跟随宿主「主视图」绑定的会话(uiSession.current):该槽位的 owner props 不带 sessionId,所以同页子会话(subagent)的 header 上,面板展示的仍是主会话大纲。若宿主将来在 props 里给 sessionId,会优先使用它。
  • 面板为 fixed 定位,与其它右上角悬浮插件共存时可能重叠,需各自错开 top。
  • 「N 工具 / N 字」统计口径是快照里该轮之后的 tool 节点数与 assistant 正文字符数,宿主若改变节点 kind 命名会退化为不显示(不会报错)。
  • 导出文件名固定为 dsh-conversation-outline.md,不做命名配置。