DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

lyfZhixing /

lyfZhixing/dsh-anchor-rail

Verified

DSH Web 会话锚点导轨插件:左侧导轨展示当前模型表面全部用户问题,悬浮显示全部锚点名称(与导轨对齐),点击快速跳转。Session anchor rail for DeepSeek Harness Web.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@3506ed9e

dsh-anchor-rail

DSH Web 会话锚点导轨插件:长会话快速定位历史问题。

功能

会话锚点导轨

  • 会话聊天区左缘一条固定导轨,展示当前模型表面上的全部用户问题锚点(不随滚动移动,整组上下居中)
  • 悬浮导轨(或任意锚点)→ 导轨右侧展示全部锚点名称,每个名称与对应锚点垂直对齐(#序号 + 问题文本),方便直接阅读问题并选择;移出后自动收起(150ms 宽限)
  • 当前正在阅读的问题对应锚点/名称高亮加长(品牌色),随滚动实时切换
  • 点击锚点或名称跳转到该问题:已渲染的直接滚动定位(与当前判定同参考线,点击谁高亮谁);窗口外的问题自动逐页加载历史后再定位,加载中锚点有脉冲动画
  • 锚点过多时导轨内部滚动并跟随当前锚点,名称列表同步滚动
  • 问题少于 2 个或内容无需滚动时导轨自动隐藏

效果展示

悬浮导轨后,全部锚点名称在导轨右侧按标记位置对齐展开(#序号 + 问题文本),当前阅读的问题高亮:

dsh-anchor-rail 效果展示

安装

方式一:dsh plugin 安装(推荐)

dsh plugin --profile web add dsh-anchor-rail

方式二:profile 本地包

  1. 将本仓库放到 ~/.dsh/profiles/web/plugins/dsh-anchor-rail/
  2. 在 ~/.dsh/profiles/web/package.json 增加:
"dependencies": {
  "dsh-anchor-rail": "link:plugins\\dsh-anchor-rail"
},
"dsh": {
  "profile": {
    "bundles": [ "...", "dsh-anchor-rail" ]
  }
}
  1. 在 profile 目录执行 pnpm install
  2. 重启 DSH Web 服务

工作原理

  • Host 半:sessionQuery.readSurface 一次性读取会话当前模型表面的全部用户消息(compaction 后仍是完整表面,被折叠替换的旧问题自动排除),提取 {seq, text} 并按 sessionId + 表面尾部 seq 缓存——只有新消息才重读,其余请求均为缓存命中。通过 /dsh-anchor-rail/anchors 路由提供给客户端。
  • Client 半:锚点按序号映射(渲染窗口始终是表面的后缀),标记等距分布、上下居中;滚动只扫描已渲染行计算"当前"索引;跳转窗口外问题时循环调用会话 loadOlder()(50 条/页)逐页加载直到目标渲染后定位。

结构

  • lib/index.js — Host 半:锚点数据路由 + 缓存
  • lib/client.js — Client 半(window.__ModuleLoader__ 打包格式):导轨 + 悬浮名称列表
  • cordis.patch.yml — bundle 组合层,插入 anchor-rail 行

License

MIT

—/ 5

No ratings yet

Verified DSH bundle

Commit 3506ed9e619a

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout