fix(web): Copy sole fenced messages without delimiters#4
What Changed
When a user or assistant message is exactly one fenced code block, the message Copy button now copies the code inside the fence without the opening and closing delimiter lines. Messages with prose around the block, several blocks, or trailing content after the closing fence copy exactly as before. Backtick and tilde fences, longer closing fences and CRLF line endings are handled.
Copy for messages that carry structured context references keeps its existing rich clipboard payload, including fenced references in plain text and the HTML fallback.
Why
A message that is only a command or snippet is usually copied to paste somewhere that does not understand Markdown, so the fence lines had to be deleted by hand every time. The unwrap stops at the first valid closing fence and returns the original text whenever the message is anything other than a single complete block, so ordinary Markdown messages are unaffected.
Checklist
- This PR is small and focused
- I explained what changed and why
- I included before/after screenshots for any UI changes
- I included a video for animation/interaction changes
Added 1 commit
- fix(web): Copy sole fenced messages without delimitersb7eaf65