Bundle
dsh-conversation-threads
Codex-style message-bar navigation rail for the DSH dialog: a vertical rail of short horizontal lines (one per user message) at the sidebar's right outer edge, vertically centered; hover highlights and floats the sent content (first 30 字, 15 字 per line); click jumps to the message.
- Source
- bertonsaa
- stars
- 1 stars
- License
- MIT
- Updated
- Updated 5 days ago
Readme
# dsh-conversation-threads 给 [DSH (DeepSeek Harness)](https://github.com/deepseek-ai) 对话框添加 Codex 风格的**消息条导航轨道**。 当对话很长、只能上下滚动翻找历史消息时,这条轨道让你一目了然:每条横向短线对应你发送的一条消息, 悬停即看内容、点击即跳转。 <p align="center"> <a href="https://github.com/bertonsaa/dsh-conversation-threads/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/bertonsaa/dsh-conversation-threads?style=flat&label=Stars"></a> <a href="https://github.com/bertonsaa/dsh-conversation-threads/commits/main"><img alt="Last commit" src="https://img.shields.io/github/last-commit/bertonsaa/dsh-conversation-threads?style=flat&label=last%20commit"></a> <a href="LICENSE"><img alt="License" src="https://img.shields.io/github/license/bertonsaa/dsh-conversation-threads?style=flat&label=license"></a> </p> <!-- 可以在这里放一张运行效果截图: --> ## 功能 - **位置**:轨道紧贴**侧边栏右侧外缘**(+4px,位于对话框内),并在**对话框垂直方向居中**; 侧边栏折叠/展开、窗口缩放时实时跟随(ResizeObserver)。 - **形态**:一列横向短线,从上到下排列;**每条 = 一条用户消息**(不含助手回复)。 - **悬停**:鼠标移到某条线上 → 该线高亮(品牌色 + 轻微变长),同时在**鼠标右下方**浮现该条消息的 **发送内容**——超过 30 字只显示前 30 字,每行 15 字;只显示用户发送的内容,不显示助手回复。 - **点击**:平滑滚动到对话中该消息的位置。 - **滚动同步**:浏览对话时,视口顶部对应的消息线自动高亮(位于底部时高亮最新一条)。 - 消息少于 2 条自动隐藏;明暗主题自适应;中英文界面自动切换。 ## 安装 两种方式,推荐 **Bundle 方式**(重启不失效)。 ### 方式 A:Bundle 持久安装(推荐,重启自动生效) 本仓库同时是一个标准 DSH 插件包(`package.json` + `dsh.plugin.json` + `lib/` + `cordis.patch.yml`), 走 profile 的 `dsh.profile.bundles` 通道,与 `dsh-better-sidebar` 同机制:**每次启动自动挂载,重启不失效**。 ```sh # ① 在 DSH 的 web profile 里加入本包(file: 会复制进 node_modules) cd <DSH_HOME>/profiles/web # 桌面版默认 ~/Library/Application Support/dsh-desktop/harness/profiles/web pnpm add "file:/绝对路径/dsh-conversation-threads" # ② 注册到 bundle(把名字加进 package.json 的 dsh.profile.bundles) # dsh.profile.bundles: [..., "dsh-conversation-threads"] ``` 然后重启 DSH 即自动挂载;卸载:从 `dsh.profile.bundles` 移除并 `pnpm remove dsh-conversation-threads`。 > 注意:`file:` 是复制安装——仓库里改了代码后需重新 `pnpm add` 一次才生效(或改用 `link:`)。 ### 方式 B:Skill 动态激活(临时/快速体验) 本仓库也是 DSH 的 **skill 包**:`SKILL.md` 是 skill 定义,`plugin/client.js` 是动态插件源码。 动态插件是进程级的,DSH 重启后会消失,需在会话里让模型按 SKILL.md 重新激活(`cordis_define` + `cordis_run`)。 ### 1. 获取源码 ```bash git clone https://github.com/bertonsaa/dsh-conversation-threads.git # 或直接下载 ZIP:https://github.com/bertonsaa/dsh-conversation-threads/archive/refs/heads/main.zip ``` ### 2. 放入 DSH skill 目录 把 `dsh-conversation-threads` 目录复制到 DSH 的 skill 目录之一: - **用户级(所有项目可用)**:`<DSH_HOME>/skills/dsh-conversation-threads/` (macOS 桌面版默认 `~/Library/Application Support/dsh-desktop/harness/skills/`) - **项目级(当前项目可用)**:`<项目根>/.dsh/skills/dsh-conversation-threads/` ### 3. 激活插件 重新打开/继续一个会话,`conversation-threads` 会出现在 skill 目录中。让模型加载该 skill (或直接说"安装 conversation-threads 消息条"),模型会按 `SKILL.md` 的激活流程执行: 读取 `plugin/client.js` → `cordis_define` → `cordis_run` → 界面批准,即可生效。 ## 使用 激活后无需任何操作:轨道自动出现在对话框左侧(侧边栏右缘外侧、垂直居中)。悬停看内容、点击跳转。 > 动态插件是会话级、进程级的:DSH 重启后需要重新激活一次(再次让模型执行激活流程即可)。 ## 自定义 - **样式**:`plugin/client.js` 末尾的 `css` 常量(`.ctr-*` 类)——线的长度/粗细/颜色/间距、预览卡片样式。 - **行为**:代码顶部可调——`truncatePreview`(30 字 / 每行 15 字)、`sidebarRight() + 4`(水平偏移)、 `dialogCenterY()`(垂直居中基准)。 ## 兼容性 - 需要 DSH 的动态 Cordis 插件能力(`cordis` agent preset)。 - 纯客户端实现:无 Host 部分、无 API key、不产生网络请求、不发送任何数据。 ## License [MIT](./LICENSE) © 2025 bertonsaa
Install
dsh plugin --profile web add github:bertonsaa/dsh-conversation-threads
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-conversation-threads from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.