
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-session-toc
Advanced tools
A floating right-side table of contents (TOC) for the DeepSeek Harness Web UI: one entry per user question, click to scroll to that message.
右侧会话目录(Table of Contents)插件,为 DeepSeek Harness Web UI 的每个会话页加一个右侧中间常驻、可折叠的目录栏:把会话里的每个「用户提问」作为一条目录项列出,点一下尽量把会话滚动到对应消息,并高亮当前条目。
对应 DeepSeek 官网网页版里"右侧目录索引,点一下跳转到对应内容"的能力。
shell.overlay 浮动层,垂直居中靠右,默认 click-through,条目可交互。sessionQuery.readSession),覆盖整段会话(含早期未加载进内存的消息)。data-chat-anchor-key)精确定位并滚动;早期消息自动 loadOlder 补加载后定位;定位不可靠时降级为"仅高亮当前条目"。data-dsh-toc-theme):卡片顶部控制条可切换目录栏自身的明/暗皮肤,并可拖动滑杆调节背景不透明度(只影响背景、文字始终不透明可读)。选择持久化到 localStorage(dsh-session-toc.theme / dsh-session-toc.bgAlpha),跨会话、刷新保留,且独立于 DSH 全局主题。readSession(磁盘读 + 深拷贝 + 全量 replay);persisted 会话按 revision 失效、live 会话按消息序号增量失效。$DSH_HOME/storages/session-toc/)跨进程/重启保留,重启后切换会话也能秒开。@deepseek-ai/* 内置包,仅以 bundle 插件方式挂载。需要本机已安装 pnpm,且 DSH 的 web profile 存在(如 ~/.dsh/profiles/web)。
git clone https://github.com/notload/dsh-session-toc.git
cd dsh-session-toc
dsh plugin --profile web add link:$(pwd)
如果
$(pwd)在你的 shell 里不生效,直接写完整的绝对路径即可,例如 Windows:dsh plugin --profile web add link:C:\Users\<你的用户名>\dsh-session-toc
dsh plugin --profile web add dsh-session-toc
安装后会写入 profile 的 package.json 的 dependencies,并自动进入 dsh.profile.bundles 层栈(dsh plugin 会自动 reconcile)。
确认进入层栈:
dsh plugin --profile web list
然后重启 dsh web,浏览器访问同一 URL,即可在会话页右侧看到目录栏。
目录参数通过 cordis.patch.yml 传给 host 半侧(apply 的 config)。注意:DSH 客户端配置管线当前尚未打通,浏览器半侧收到的 config 是空对象,因此以下参数目前以代码默认值为准(与 dsh-pet 同样的限制)。
配置项(对照 lib/client.js 的默认值):
| key | 默认值 | 说明 |
|---|---|---|
minEntries | 1 | 当前会话用户提问少于该值时隐藏目录栏 |
maxChars | 48 | 单条目录文案的最大字符数(超出加省略号) |
collapsed | false | 初始是否折叠 |
当前这些值在 client 里不可被用户覆盖。若需要可配置,需等 DSH 打通客户端配置管线,或改为硬编码默认值。
/session-toc/questions?sessionId=…,host 用 ctx.sessionQuery.readSession 读取整个会话日志并提取全部 user/message 事件,再返回给浏览器生成目录。🖼 文件名,无文件名用媒体类型兜底)。这样就不会出现"文字说明 + 文件名"混杂的目录条目。source.kind === 'user' 的事件,session-reference、workspace 等注入式上下文不会进目录。background-agents/* 新事件类型,报 SessionFormatUnsupportedError)时,返回结构化错误码(SESSION_FORMAT_UNSUPPORTED / SESSION_READ_FAILED)。$DSH_HOME/storages/session-toc/<id>.json)跨进程/重启保留,仅对 persisted 会话生效;revision(sessionPersistence 的 stat 级变更 token),live 会话按消息序号(lastSeq)零 IO 增量校验。readSession(磁盘读 + 多次深拷贝 + 全量 replay 校验);失败结果不缓存。sec-fetch-site 或同源 Origin),curl/脚本/局域网主机等裸请求一律 403;sessionId 还需属于当前 host 可见会话(live 或 persisted),否则拒绝;错误响应不回显内部错误详情。data-chat-anchor-key(= 节点的 engine 稳定 key)。本插件优先用它来精确定位:点击条目时 document.querySelector('[data-chat-anchor-key="<key>"]') 找到节点并 scrollIntoView({block:'center'})。这比文本/图片匹配可靠得多,图片消息也能准确定位(图片节点同样有该属性)。conversationContextKey("input-message", userMessageId) = "13:input-message" + id,其中 id 是 host 从会话日志取出的用户消息 id。session.loadOlder(),每页之间用 requestAnimationFrame 让出主线程(不再用 requestIdleCallback 排队叠加,避免浏览器忙碌时越卡);guard 按目标距离估算(estimateLoadOlderPages,封顶 40 页)。浏览器 console 会打印 [dsh-session-toc] jump {targetSeq,pages,ms} 供量化。loadOlder 不可用)或拿不到 id 时,降级为文本匹配;仍失败则仅高亮条目。dsh-session-toc
├── package.json # bundle + client 声明
├── cordis.patch.yml # 挂载声明(insert 行)
├── lib
│ ├── index.js # host 半侧占位插件
│ ├── client.js # 浏览器半侧:右侧目录栏 UI + 滚动定位
│ └── types
│ ├── index.d.ts # host 侧类型
│ └── client
│ └── index.d.ts # 浏览器侧类型
└── README.md
MIT © notload
如果这个插件对你有帮助,欢迎点个 ⭐ Star 支持一下~
FAQs
A floating right-side table of contents (TOC) for the DeepSeek Harness Web UI: one entry per user question, click to scroll to that message.
The npm package dsh-session-toc receives a total of 8 weekly downloads. As such, dsh-session-toc popularity was classified as not popular.
We found that dsh-session-toc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.