import { mentionRegexGlobal } from "@roo/context-mentions" import { vscode } from "../../utils/vscode" interface MentionProps { text?: string withShadow?: boolean } export const Mention = ({ text, withShadow = false }: MentionProps) => { if (!text) { return <>{text} } const parts = text.split(mentionRegexGlobal).map((part, index) => { if (index % 2 === 0) { // This is regular text. return part } else { // This is a mention. return ( vscode.postMessage({ type: "openMention", text: part })}> @{part} ) } }) return <>{parts} }