Asianfleet/dsh-message-copy-enhance
dsh-message-copy-enhance rewrites what you copy out of a DSH model message into Markdown: links become label, KaTeX formulas recover their TeX source, code blocks become fenced blocks with their language, and headings/lists/tables come back as GFM - while selections outside assistant messages are left untouched.
dsh-message-copy-enhance rewrites what you copy out of a DSH model message into Markdown. When you select text in an assistant answer and copy it, the plugin expands the selection to the full .katex element, clones the selection DOM with Range.cloneContents(), recovers markdown through its built-in zero-dependency DOM-to-Markdown converter, and calls preventDefault() to replace the clipboard content. Links become label, KaTeX-rendered inline/block formulas recover their TeX source from the <annotation encoding="application/x-tex"> MathML branch and become $...$ / $$...$$, code blocks become fenced blocks with the language taken from the language-* class or banner, and headings, emphasis, lists, quotes and tables come back as GFM - so pasting into Typora, Obsidian, VS Code or any markdown editor preserves the structure.
Install
dsh plugin --profile desktop add dsh-message-copy-enhanceCopied verbatim from the README's Install block. The README also documents the upgrade form dsh plugin --profile desktop add dsh-message-copy-enhance@latest. npm package dsh-message-copy-enhance at 0.2.1 (registry check 2026-10-16; the registry repository field resolves back to this repo).
Compatibility
The plugin listens for copy on document in the capture phase and takes over only when the selection starts inside an assistant message ([data-chat-flow-kind="assistant"]) and contains markdown-significant elements; other selections (user bubbles, tool cards, plain text) and empty selections are unaffected, and if conversion fails the default copy behaviour is restored automatically. It writes both text/plain and text/markdown to the clipboard. Selections spanning multiple messages are not intercepted, and links filtered out by the render whitelist cannot be recovered because they have no href.
Details
- Repo: Asianfleet/dsh-message-copy-enhance
- Category: Web UI Enhancements
- Stars: 4
- Version: GitHub repo Asianfleet/dsh-message-copy-enhance (4*); npm package dsh-message-copy-enhance at 0.2.1 (registry check 2026-10-16; the registry repository field resolves back to this repo). MIT licensed; TypeScript strict; ships a pre-generated prebuilt dist/client.js. English README with a README_zh.md Chinese translation.
Alternatives
0lidaxiang/dsh-plugin-greet · 147228/dsh-black-whale · 15828148/dsh-portable-launcher