agent_ui: Serialize copied selection mentions as links (#54031)

Fixes #53981

Selection mentions inserted from the agent panel are stored as folded
placeholder text in the message editor. That meant a normal copy would
put the literal `selection` token on the clipboard, and pasting into a
new thread would lose the original mention context.

This teaches `MessageEditor` to serialize selected folded mentions as
their mention links before writing to the clipboard. The surrounding
text stays intact, and the existing paste path can rebuild the mentions
in a fresh thread.

Release Notes:

- Fixed copied agent prompts replacing selection mentions with the
literal word `selection`.

---------

Co-authored-by: Neel <neel@zed.dev>
4733ae4de3Hamza Paracha committed on 4/23/2026, 4:37:00 PM· committed by GitHubparent8127c97
3 files changedLine totals unavailable