DSH HUB
首页插件商店插件包社区排行榜资源发布指南
插件源码
返回插件目录

Triple3h /

Triple3h/dsh-session-enhance

已验证

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

★ 0 Stars0 Forks0 IssuesN/A 社区评分0 已确认安装
查看 GitHub
README来源: master@a43e28c4

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

—/ 5

暂无评分

已验证 DSH bundle

Commit a43e28c40834

社区评论

还没有评论,来写第一条。

DSH HUB

社区维护的 DSH 插件索引。不是 GitHub 或 DeepSeek AI 的官方产品。

社区资源API关于