dsh-command-rail
Manifest validDSH web plugin: a Codex-style command-history rail covering the WHOLE session
dsh-command-rail
Codex 风格的「用户指令历史轨道」插件 for DSH。
会话区左缘出现一列低对比度短横条,每根对应当前会话中的一条用户指令—— 覆盖整个会话的完整历史,而不只是当前渲染出来的最近几十条:
- 全量数据 — 通过官方客户端 API(
connection.api.sessions.history+beforeSeq翻页)走完整持久历史;DOM 只保留最近 ~50 个事件的窗口,轨道不受此限 - 悬浮 — 横条变宽变亮,Popover 显示「第 N / M 条指令」+ 指令摘要(取自历史记录, 未加载进 DOM 的旧指令同样有摘要)
- 点击 — 平滑滚动定位到该条指令;若目标不在当前窗口内,先通过
sessions.scope(id).conversation.loadOlder()逐页加载更早历史,直到该消息进入 DOM 再跳转并高亮 - 当前位置 — 阅读位置对应的横条保持品牌色高亮(DOM 行与历史条目按文本签名 对齐,容忍截断差异)
- 会话切换 — 订阅 sessions 列表自动检测,切换即重走历史
- 降级 — 历史 API 不可用时退回 DOM 采集模式,轨道不会消失
- 自适应 — 指令多时逐级压缩条高/间距(最低 2px);超过 400 条时均匀采样
实现要点
- 渲染行锚定 MessageItem css-module 稳定后缀
[class*="_userRow"](_userStack子节点双重校验,排除 pending-steering 瞬态行),构建哈希变化不影响识别 - 仅使用官方服务接口(sessions / connection),不做任何内部 patch
- 纯逻辑函数全部导出供测试:
test/rail-logic.test.mjs(35 项断言)
安装
dsh plugin --profile desktop add dsh-command-rail-0.3.1.tgz
新插件首次安装需要重启 DSH Desktop;已装插件的更新走 HMR 热生效 (版本号不变时 pnpm 会跳过重装,务必升版本号)。
测试
node test/rail-logic.test.mjs
Comments
Loading…
Similar plugins
by EnkiduGilgamesh
DeepSeek Harness plugin: a hoverable/clickable outline rail on the left of the chat column (one marker per turn, summary card on hover, click to jump).
★ 0
MIT
JavaScript
Aug 15, 2026
dsh plugin --profile web add dsh-codex-side-outlineby qschen86
DSH web plugin: workspace dock rail left of the sidebar
★ 0
MIT
JavaScript
Aug 17, 2026
dsh plugin --profile web add dsh-workspace-dockby LeonSone
DSH web plugin: 模仿 deepseek 网页版界面右侧的问题条 — 右缘一条竖向问题栏,列出当前会话每一轮的用户提问,点击平滑滚动定位。DeepSeek Harness right-edge question rail.
★ 0
MIT
JavaScript
Sep 4, 2026
dsh plugin --profile web add dsh-question-railby sunyuhuirong
DeepSeek Harness plugin: conversation history request rail (ZCode-style) - 会话历史请求迷你滑轨
★ 4
MIT
JavaScript
Aug 26, 2026
dsh plugin --profile web add shl-session-historyby lzbaclz
Codex-style conversation outline for DeepSeek Harness Web: a right-edge rail with hover preview and click-to-jump
★ 6
↓ 17/wk
MIT
JavaScript
Sep 18, 2026
dsh plugin --profile web add dsh-conversation-outlineby qschen86
DSH web plugin: DeepSeek API balance & today usage badge in the sidebar rail
★ 0
MIT
JavaScript
Aug 19, 2026
dsh plugin --profile web add dsh-deepseek-balance