735bea5dee1aa6fa04b84bc3144fcf93930f2e33
The old approach used document.execCommand("insertText") to directly
manipulate the contentEditable DOM, but MDXEditor (Lexical) reverted
these changes during reconciliation causing the "blink" bug.
Fix: work at the markdown string level instead — find the @query in
the markdown, replace it with @Name, and update via setMarkdown().
Also add an input event listener alongside selectionchange for more
reliable mention detection (fixes space-to-dismiss).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Description
Languages
TypeScript
96.8%
Shell
1.7%
JavaScript
1%
CSS
0.3%
HTML
0.2%