Asianfleet/dsh-message-copy-enhance

Asianfleet★ 0TypeScript最后同步: 2026-08-19

在 GitHub 打开

Copy dsh assistant output as Markdown, preserving links, LaTeX sources and code fences.

README 摘要

dsh-message-copy-enhance English · 中文 A DeepSeek Harness client UI plugin: when you select text in a model message and copy it, the clipboard content is rewritten to Markdown , so links, LaTeX source, code-fence language info, and more are no longer lost. How it works DSH renders model output via dsh-client-ui-conversation → dsh-client-ui-primitives : Content DOM shape Recovery Links Take the href directly, output label Inline / block LaTeX KaTeX-rendered .katex / .katex-display Retrieve the TeX source from the in the MathML branch, output $...$ / $$...$$ Code blocks .md-code-block (banner shows the language) + pre Output a fenced code block; the language comes from the language- class or the banner's infostring Headings / emphasis / lists / quotes / tables Standard HTML Recovered as GFM The plugin listens for copy on document in the capture phase , and takes over only when the selection starts inside a [data-chat-flow-kind="assistant"] message and contains markdown-significant elements: 1. Expand the selection to the full .katex element (selecting in the middle of a formula still gets the complete source) 2. Clone the selection DOM with Range.cloneContents() 3. Recover the markdow…

在 GitHub 查看完整 README →
Agent/智能体dsh-plugin

分类