yx-yinhe/dsh-message-navigator0

@yinhe/dsh-message-navigator

A ChatGPT-style message navigator with hover previews for DeepSeek Harness conversations.

包名
@yinhe/dsh-message-navigator
版本
1.0.0
许可证
MIT
最近更新
2026年8月27日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:yx-yinhe/dsh-message-navigator

DSH Message Navigator

@yinhe/dsh-message-navigator 在 DeepSeek Harness 对话左侧增加一条接近 ChatGPT 的紧凑消息导航:

  • 索引当前会话中可见的普通用户消息和插话,并按会话顺序绘制标记;
  • 导航始终贴在左侧边栏右侧,并随侧栏展开、收起和拖动同步定位;
  • 当前视口附近的消息自动高亮,滚动和窗口尺寸变化时同步更新;
  • 标记统一左对齐并使用 2px 厚度;普通、当前、悬停标记的宽度比例为 1:1.5:4;
  • 悬停当前标记时,相邻标记按距离依次缩短;
  • 鼠标悬停或键盘聚焦时,在原有气泡中显示本轮问答:用户消息支持多行半粗显示,助手回答使用次级文字色;
  • 点击后以平滑滚动定位到对应聊天节点,支持键盘操作和屏幕阅读器;
  • 能为纯文本、图片、文件和混合附件生成稳定预览;
  • 不替换会话视图,只占用 conversation.session.header.utilities 增量 Slot;
  • 使用 DSH 主题 token,兼容浅色和深色主题,并适配窄屏。

包结构

  • src/core.js:消息提取、预览与锚点查找的纯函数;
  • src/client.js:可读的 Client 插件源码;
  • lib/client.js:DSH dsh.client 模块加载器可直接消费的浏览器 bundle;
  • lib/index.js:空 Host half,用于 Cordis Loader 挂载。

验证

npm test
npm run check

安装

从 GitHub 安装稳定版:

dsh plugin --profile web add github:yx-yinhe/dsh-message-navigator#v1.0.0

也可以安装最新的 main 分支:

dsh plugin --profile web add github:yx-yinhe/dsh-message-navigator

本地开发时可直接安装工作区:

dsh plugin --profile web add file:D:/GitHub/dsh-message-navigator

dsh plugin 会识别 cordis.patch.yml,把 yinhe-message-navigator 行加入 Profile layer;Host 随后通过 exports["./client"]dsh.client 声明发现浏览器 bundle。安装后重启对应 Web Profile。

插件市场

仓库使用 GitHub 的 dsh-plugin topic,可被 DSH 的 find_dsh_plugin 市场搜索工具发现。搜索“message navigator”“conversation navigation”或“ChatGPT navigation”即可找到本插件。

兼容性

点击定位使用 DSH 聊天视图公开在渲染树上的语义锚点 data-chat-anchor-key。若未来 DSH 更改该锚点名称,需要同步更新 findChatAnchor

作者

yx-yinhe