AI Integration Quick Reference
AI Integration Quick Reference
@ in the composer lists the people you can mention — users
in a one-to-one chat, the group’s members in a group, with @all first in a group. A picked
mention is sent as <@uid:UID> and drawn as @Name everywhere the message appears.
CometChatMentionsFormatter is the formatter that does it; you configure it, or pass your own.
Usage
1. Create the formatter
2. Pass it to a component
- SwiftUI
- UIKit
The composer’s The message list makes its own mentions formatter; configure mention-all there directly:
textFormatters replaces its list — nil, the default, is one mentions
formatter. Keep yours in @State so it is not rebuilt on every render:TeamComposer.swift
In both toolkits a mention always starts with
@
(a custom tracking character is ignored), and mention-all shows as @ and its id — @all.Mention Click Handling
A picked suggestion in the composer:- SwiftUI
- UIKit
ChatUser. The UIKit list has no mention tap.
Styling Mentions
Composer mention style
- SwiftUI
- UIKit
In the input, a mention of someone else is drawn in the theme’s
primary and a mention of you
in warning. Change them through the theme — see Theming.Message bubble mention style
- SwiftUI
- UIKit
A mention of someone else uses the text bubble’s
mentionColor, with a 20 % tint behind it; a
mention of you, and @all, stay warning:Conversations mention style
The last-message line runs the formatters, so a mention reads@Name. Colour it:
- SwiftUI
- UIKit
Customization Matrix
Next Steps
Text Formatter Base Class
Write your own formatter
Message Composer
The composer’s mention options
Message List
Bubble factories and styles
All Guides
Browse the other guides