Back to home

bertonsaa

dsh-conversation-threads

No description

Stars
0
Language
JavaScript
Created
Aug 16, 2026
Updated
Aug 16, 2026

Introduction

dsh-conversation-threads

DSH (DeepSeek Harness) 对话框添加 Codex 风格的消息条导航轨道。 当对话很长、只能上下滚动翻找历史消息时,这条轨道让你一目了然:每条横向短线对应你发送的一条消息, 悬停即看内容、点击即跳转。

GitHub stars Last commit License

功能

  • 位置:轨道紧贴侧边栏右侧外缘(+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 同机制:每次启动自动挂载,重启不失效

# ① 在 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. 获取源码

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.jscordis_definecordis_run → 界面批准,即可生效。

使用

激活后无需任何操作:轨道自动出现在对话框左侧(侧边栏右缘外侧、垂直居中)。悬停看内容、点击跳转。

动态插件是会话级、进程级的:DSH 重启后需要重新激活一次(再次让模型执行激活流程即可)。

自定义

  • 样式plugin/client.js 末尾的 css 常量(.ctr-* 类)——线的长度/粗细/颜色/间距、预览卡片样式。
  • 行为:代码顶部可调——truncatePreview(30 字 / 每行 15 字)、sidebarRight() + 4(水平偏移)、 dialogCenterY()(垂直居中基准)。

兼容性

  • 需要 DSH 的动态 Cordis 插件能力(cordis agent preset)。
  • 纯客户端实现:无 Host 部分、无 API key、不产生网络请求、不发送任何数据。

License

MIT © 2025 bertonsaa