mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-30 16:20:35 +02:00
`disableMentions` previously skipped registering BaseMentionExtension entirely, which removed the `mention` node type from the editor's schema. Pasting any ProseMirror slice from another Multica editor (clipboard `text/html` carries `data-pm-slice`) caused ProseMirror to silently drop the mention nodes and any surrounding inline text glued to them. Keep the extension registered in all cases. When `disableMentions=true`, attach an inert suggestion (`allow: () => false`) so typing `@` still does not pop the picker — matching the original product intent for agent system prompts — but existing mentions pasted in survive and render as the normal pill. Earlier attempt #2477 patched the paste classifier instead and broke in a different way (`mention://` href tripped the markdown link validator), which led to revert #2510. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>