Skip to content

Commit 9c71774

Browse files
committed
fix(queue): render context chips in queued messages
- Remove plainMentions from queued message rows so context chips render with icons, consistent with sent messages - Fix computeMentionRanges to use '/' prefix for skill contexts (content has the slash trigger restored at submit time, not '@')
1 parent 3ad3710 commit 9c71774

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

apps/sim/app/workspace/[workspaceId]/home/components/queued-messages/queued-messages.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,7 @@ export function QueuedMessages({
9191
</div>
9292

9393
<div className='min-w-0 flex-1 overflow-hidden'>
94-
<UserMessageContent
95-
content={msg.content}
96-
contexts={msg.contexts}
97-
plainMentions
98-
compact
99-
/>
94+
<UserMessageContent content={msg.content} contexts={msg.contexts} compact />
10095
</div>
10196

10297
{msg.fileAttachments && msg.fileAttachments.length > 0 && (

apps/sim/app/workspace/[workspaceId]/home/components/user-message-content/user-message-content.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ function computeMentionRanges(text: string, contexts: ChatMessageContext[]): Men
3838

3939
for (const ctx of contexts) {
4040
if (!ctx.label) continue
41-
const token = `@${ctx.label}`
41+
const prefix = ctx.kind === 'skill' ? '/' : '@'
42+
const token = `${prefix}${ctx.label}`
4243
const pattern = new RegExp(`(^|\\s)(${escapeRegex(token)})(\\s|$)`, 'g')
4344
let match: RegExpExecArray | null
4445
while ((match = pattern.exec(text)) !== null) {

0 commit comments

Comments
 (0)