Plugin directory / Knowledge / dsh-session-enhance
dsh-session-enhance
Verified · install-tested on dsh Triple3h
What it does
DSH Web plugin: session sidebar enhancements — copy session ID from the context menu, etc. DSH Web 插件:会话栏增强(上下文菜单一键复制会话 ID 等)。
Works — verified, early-stage project
DSH Web plugin: session sidebar enhancements — copy session ID from the context menu, etc. DSH Web 插件:会话栏增强(上下文菜单一键复制会话 ID 等)。 It installs cleanly and boots without issues in our testing. It's early-stage but functional.
“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.
README
dsh-session-enhance
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/pointerdownin 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 toexecCommand('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
Install
Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:
dsh plugin add dshbase-catalog Then say "install dsh-session-enhance for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.
This plugin is GitHub source (not published to npm) — install it straight from the repo:
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 Test report
Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.