asukasec/dsh-message-preview ↗★ 0
dsh-message-preview
Sidebar message-history preview for DeepSeek Harness web UI: lists the current session's sent messages with previews; click to jump the chat to that message.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:asukasec/dsh-message-preview说明文档
阅读完整 README ↗dsh-message-preview
DeepSeek Harness Web UI 的右侧消息导航条。它为当前会话中的每条用户消息生成一个导航块,可悬停预览、显示当前阅读位置,并点击跳转到对应消息。
Right-side user-message navigator for the DeepSeek Harness Web UI, with hover previews, reading-position tracking, and click-to-jump navigation.
功能
- 只索引用户直接发送的消息,排除工具通知、后台任务和注入上下文。
- 当前阅读位置随会话滚动自动高亮。
- 悬停显示消息序号、相对时间和文本预览。
- 点击后自动加载较早的会话历史,平滑滚动并高亮目标消息。
- 导航块会根据消息数量和文本长度自适应排布;少于两条用户消息时自动隐藏。
- 默认仅显示当前位置指示,鼠标靠近会话右侧时展开完整导航条。
- 中英文界面文案随 DSH locale 自动切换。
安装
要求:
- DeepSeek Harness
0.1.0-rc.6或更高版本 - Node.js 24 或更高版本(与当前 DSH 要求一致)
从 GitHub 安装:
dsh plugin --profile web add "github:asukasec/dsh-message-preview#main"
安装完成后完整重启 Web UI:
dsh web
也可以克隆仓库后从本地目录安装:
git clone https://github.com/asukasec/dsh-message-preview.git
cd dsh-message-preview
dsh plugin --profile web add .
Windows 用户还可以在克隆后的目录中双击 install.cmd。该脚本会定位 DSH_HOME、复制插件,并以幂等方式更新指定 profile 的 cordis.patch.yml:
.\install.ps1 -Profile web -DshHome "D:\path\to\dsh-data"
使用
打开至少包含两条用户消息的会话。会话右侧会显示一枚当前位置指示;将鼠标移到右缘即可展开导航条。
- 悬停导航块:查看消息序号、发送时间和文本预览。
- 点击导航块:跳转到该条用户消息。
- 滚动会话:高亮块会跟随当前阅读位置。
插件没有设置项,安装后即可使用。
工作原理
插件由宿主端和浏览器端两部分组成:
| 部分 | 文件 | 作用 |
|---|---|---|
| 宿主端 | lib/index.js | 注册 messageIndex 会话投影,维护用户消息的序号、时间、短预览和持久 ID。 |
| 浏览器端 | lib/client.js | 挂载到 conversation.input.dock,通过 React Portal 渲染导航条,并负责预览、滚动定位和历史补载。 |
| Bundle | cordis.patch.yml | 让 dsh plugin add 自动把插件加载到 Web profile。 |
数据按以下优先级获取: