dshbase

插件目录 / Knowledge / dsh-session-enhance

dsh-session-enhance

已验证 · 实测可装 Triple3h

✓ 持续维护 2 位贡献者

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-23最近推送
跨平台平台

功能简介

DSH Web plugin: session sidebar enhancements — copy session ID from the context menu, etc. DSH Web 插件:会话栏增强(上下文菜单一键复制会话 ID 等)。

✅
我们的评价
可用 — 实测通过,早期项目

DSH Web plugin: session sidebar enhancements — copy session ID from the context menu, etc. DSH Web 插件:会话栏增强(上下文菜单一键复制会话 ID 等)。 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-session-enhance

English | 中文

GitHub stars
GitHub license

A DeepSeek Harness (dsh) Web plugin that enhances the session sidebar — currently: copy the session ID with one click.

What you get

Copy session ID — a Copy session ID entry is appended to the context menu of the left session list (next to rename / fork / archive). Click it to write that session's full sessionId to the clipboard, with a brief "Copied!" feedback.

How it works:

  • Gets the session list via ctx.sessions.list.getSnapshot(), matching row elements to session IDs by title.
  • Listens for contextmenu/pointerdown in the capture phase and remembers which row you interacted with (invalidating that row's title-match cache, so a just-renamed session yields the right ID).
  • When the menu appears, resolves the ID from the remembered row first; only if that fails or is stale (>5s) does it fall back to the active row — right-clicking a non-active session still copies the right ID.
  • Uses a MutationObserver (rAF-coalesced) to detect the menu portal entering the DOM, then clones an existing menu item's structure to append the Copy session ID button.
  • Prefers navigator.clipboard.writeText, falling back to execCommand('copy').

Install (link, development)

npm install        # installs esbuild (devDependency, build only)
npm run build      # src/client.js → lib/client.js
npm run link-profile

link-profile adds a link: dependency, appends to dsh.profile.bundles, and runs pnpm install in the profile. Then restart dsh web (by convention, no auto-restart).

Directory layout

src/client.js        # browser source (hand-written ModuleLoader format; the client logic lives here)
lib/index.js         # host-side empty apply (host plugin logic goes here; see dsh-image-read)
lib/client.js        # browser build output (npm run build)
package.json         # three essentials: dsh.bundle.patch + dsh.client declaration + exports["./client"]
cordis.patch.yml     # bundle patch: inserts into the profile plugin tree
build.mjs            # build script (esbuild)
link-profile.mjs     # link install script

Development notes

  • Project-level skill dsh-plugin-dev: SKILL.md + references/ (manifest three essentials, client half, paste/reference chain, pnpm pitfalls).
  • Reference implementations: dsh-text-collapse (complete client plugin template), dsh-image-read (host tool plugin), ~/.dsh/profiles/web/node_modules/dsh-chat-timeline (hand-written client bundle).
  • Authoritative source for DSH internal APIs: /opt/homebrew/lib/node_modules/@deepseek-ai/dsh/ (installed version).

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-session-enhance」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:Triple3h/dsh-session-enhance

Headless(CLI)profile:

dsh plugin --profile headless add github:Triple3h/dsh-session-enhance

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Knowledge 里更多

浏览全部 7819 个插件 →