Repository navigation
Replies: 3 comments
Follow-up fix: copy selected Markdown and TeX instead of flattened math glyphsThe earlier file-link prototype had a gap: it handled only selections containing a recognized link. A link-less passage fell through to native copying, so rendered math could copy both visual and accessibility text as duplicated, vertically separated symbols (for example mu and its D/B subscripts). A rich HTML clipboard flavor could also win over the Markdown text when pasted into the composer. The reference implementation now handles selected passages within one Markdown owner regardless of links. It preserves headings, emphasis, quotes, lists, tables, code fences and file/web addresses. Formula rendering retains the original TeX as copy metadata; selections within a formula are treated atomically and yield that formula once, wrapped in Source: f7ffaffd7d. Validation includes focused regression tests (59 passed across copy and DOM parity tests), plus real Windows Electron Ctrl+C and Ctrl+V into the DSH composer. The native smoke verifies Chinese prose, inline TeX, display equations selected from a visual fragment, and an absolute Chinese file link with a line anchor. Nine DOM snapshots changed only by the new copy-source attributes; math rendering itself is unchanged. The selected-source behavior is deliberate for this custom workflow. Selections extending outside one Markdown owner still follow the browser's native behavior. This update does not claim to fix Chinese IME composition; that is a separate patch. |
|
Downstream follow-up on official The selected-text and whole-reply Copy paths now share a content-only policy: prose, headings, emphasis, list/quote markers, code fences and link destinations are omitted; visible text and code content remain. Formula selections use original LaTeX ( This policy is a user-requested preference, rather than a claim that ordinary Markdown/link-preserving copy is inherently a bug. An upstream implementation could expose the policy as a preference; this downstream build currently applies it to both selection copying and the message Copy button. The separate “Copy as Markdown” conversation export remains available. Selections crossing assistant and literal user-message regions retain the intervening user text. Code-edge blank lines are retained. Whole user-message copying retains literal characters instead of interpreting them as Markdown. Validation on the alpha.2 integration: 298 focused tests passed (one platform skip), including clipboard, Chat flow, relay and persisted edit cases; an actual Electron run verified native selection copy, whole-message copy and paste into the composer. A separate desktop regression completed three application launches, editing and regenerating the same session across restarts. Existing custom desktop features remain integrated. Source: Myoontyee@5a3cba9 |
|
Follow-up to the content-only copy preference: an explicit paste-as-text gesture is now implemented on upstream dsh-v0.2.1-alpha.2. Ctrl+V preserves the existing clipboard text (including TeX source and Markdown tables). Ctrl+Shift+V removes Markdown presentation, converts supported formulas from a single MathML presentation tree into readable linear text, and converts table rows to tab-separated cells. Unsupported TeX is retained intact rather than discarded. No duplicate hidden math/visual glyph trees are copied. The paste-as-text gesture is consumed once and reset on blur/root changes, so a later normal paste is unaffected. Native Electron 44.7 validation passed selected-text copying, whole-message copying, normal paste, strong plain-text paste, and switching back to normal paste. Focused tests cover display equation environments and invisible labels as well. Implementation: Myoontyee/deepseek-harness@5a3cba9...f320bc9 |
Uh oh!
There was an error while loading. Please reload this page.
Selecting a clickable filename in an assistant response and copying it currently loses its destination: the local file link is rendered as a preview button, so ordinary selection copying yields only the label.
The reference implementation keeps the selected label and destination together as Markdown in text/plain and text/markdown, plus a clickable link in text/html. Workspace-relative paths are resolved by the conversation owner, and line anchors are retained. Partial label selections copy only the selected text while retaining the target. Ordinary text copying stays native. The copy handler also handles a response selection while the composer retains keyboard focus, and sanitizes the rich-text fragment.
Validation includes file and web links, partial selections, paths with spaces, line anchors, selection boundaries, unchanged Markdown rendering, and actual Ctrl+C reads of the Windows Electron clipboard. No clipboard permission prompt or remote upload is required.
Reference implementation: 9d9544d6fc. Based on upstream
dsh-v0.2.1-alpha.1. This is a feature proposal and reference implementation, not a request to merge an external PR.All reactions