dsh-session-reference-copy
August 28, 2026 · View on GitHub
A small DeepSeek Harness Web client plugin that copies the current Session as a canonical cross-session reference.
Why
Harness can reference another Session with @, but finding a specific Session by title or ID is inconvenient when moving between implementation and review conversations. This plugin adds a copy button to the current Session header and puts the exact structured mention on the clipboard:
@[Readable session title](dsh-session:<encoded-session-id>)
Paste that text into another Session and send it. Harness resolves the opaque identity and captures the source Session through its existing session-reference snapshot mechanism.
Behavior
- Uses the current Session's display title as the readable label.
- Falls back to the Session ID when no summary is available.
- Encodes the ID with Harness's canonical
dsh-session:JSON/UTF-8/base64url format. - Escapes
]and backslashes in labels. - Shows a check icon for one second after a successful clipboard write.
- Reports clipboard failures through the current conversation notice surface.
- Adds no Host RPC, persistence, or model prompt behavior of its own.
The pasted mention may remain plain canonical text in the composer instead of becoming a visual chip. This does not change the reference semantics after submission.
Session references are snapshots captured when the target message enters the model step. They are not live links to future source-Session changes.
Installation
Preferred — install the fixed release tag with the package's own no-argument installer:
npx --yes github:shaomingbo/dsh-session-reference-copy#v0.1.1
No subcommand is the same as install. The installer only edits dependencies.dsh-session-reference-copy and dsh.profile.bundles in the target profile's package.json (default profile web), writes the manifest atomically, then runs pnpm install --ignore-scripts in that profile directory. It never stops or restarts DSH.
Check installation state:
npx --yes github:shaomingbo/dsh-session-reference-copy#v0.1.1 status
Remove it (idempotent — safe to run twice, restores the manifest if dependency installation fails):
npx --yes github:shaomingbo/dsh-session-reference-copy#v0.1.1 uninstall
Options available to every command: --profile <name> (default web), --source <source>, -h/--help. The default source is pinned to the current SemVer tag; for local development point it at a checkout with link::
npx --yes github:shaomingbo/dsh-session-reference-copy#v0.1.1 --source link:/absolute/path/to/dsh-session-reference-copy
After installing or uninstalling: restart dsh web manually, then hard-refresh the existing browser page.
Manual fallback — edit ~/.dsh/profiles/web/package.json yourself:
{
"dependencies": {
"dsh-session-reference-copy": "github:shaomingbo/dsh-session-reference-copy#v0.1.1"
},
"dsh": {
"profile": {
"bundles": [
"dsh-session-reference-copy"
]
}
}
}
Then run pnpm install --ignore-scripts in that profile directory and restart DSH.
If you manage bundles through dsh plugin instead, the equivalents are dsh plugin --profile web add|update|remove dsh-session-reference-copy.
Development
npm run check
The tests cover the client bundle (canonical encoding, title fallback, slot registration, copying, clipboard refusal) plus the installer: first install, repeat install, status, uninstall, malformed manifests, bad arguments, and rollback when dependency installation fails, all inside a temporary DSH_HOME.
The client module is a self-contained DSH window.__ModuleLoader__ bundle. Tests execute it with a small module-loader fixture.
License
MIT