From 9e6cc8496548ffb3a62bde5525683b768c670702 Mon Sep 17 00:00:00 2001 From: Markov Date: Wed, 25 Feb 2026 13:31:31 +0100 Subject: [PATCH] fix: extract and send @mentions from chat messages --- src/components/ChatPanel.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/ChatPanel.tsx b/src/components/ChatPanel.tsx index 247e4cf..92cc785 100644 --- a/src/components/ChatPanel.tsx +++ b/src/components/ChatPanel.tsx @@ -146,9 +146,14 @@ export default function ChatPanel({ chatId, projectSlug }: Props) { setPendingFiles([]); setSending(true); try { + // Extract @mentions from text + const mentionMatches = text.match(/@(\w+)/g); + const mentions = mentionMatches ? [...new Set(mentionMatches.map(m => m.slice(1)))] : []; + const msg = await sendMessage({ chat_id: chatId, content: text, + mentions: mentions.length > 0 ? mentions : undefined, attachments: attachments.length > 0 ? attachments : undefined, }); setMessages((prev) => {