dsh-session-reference-copy
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
Install the tagged release into the Web profile:
dsh plugin --profile web add github:shaomingbo/dsh-session-reference-copy#v0.1.0
Restart dsh web, then hard-refresh the existing browser page. To update or remove it later:
dsh plugin --profile web update dsh-session-reference-copy
dsh plugin --profile web remove dsh-session-reference-copy
For local development, add the package as a linked dependency and bundle in ~/.dsh/profiles/web/package.json:
{
"dependencies": {
"dsh-session-reference-copy": "link:/absolute/path/to/dsh-session-reference-copy"
},
"dsh": {
"profile": {
"bundles": [
"dsh-session-reference-copy"
]
}
}
}
Then install the profile dependencies:
cd ~/.dsh/profiles/web
pnpm install --ignore-scripts
Restart DSH and hard-refresh the existing Web page so the new client bundle enters the boot graph.
Development
npm run check
The client module is a self-contained DSH window.__ModuleLoader__ bundle. Tests execute it with a small module-loader fixture and verify canonical encoding, title fallback, slot registration, successful copying, and clipboard refusal.
License
MIT
No comments yet. Be the first to write one.