AI Integration Quick Reference
AI Integration Quick Reference
Components
Implementation Steps
1. Thread State Management
Create a component that tracks the parent message the user clicked “Reply in Thread” on. When set, show the threaded messages side panel.2. Thread Trigger from Group Messages
Wire thethreadRepliesClick output on cometchat-message-list. When a user clicks the thread reply icon on any message, this fires with the parent message object.
3. Threaded Messages Component
Render the thread panel with the parent message context, the reply list scoped byparentMessage, and a composer scoped to the thread.
4. Thread Panel with Blocked Composer Fallback
When the composer is blocked (e.g., permissions), show a fallback message instead.5. Full Component Example
A complete standalone component wiring thread state, the trigger, and the panel together.Thread Subscription
Users can also subscribe to a thread, so they keep getting notified about new replies even when they are not looking at it, and unsubscribe when they no longer want them. The UI Kit surfaces this in two places, both wired out of the box once the feature is on:- A control in the top bar of the
cometchat-thread-headeryou rendered in step 3. - An option in the message context menu of
cometchat-message-list, right after Reply in thread.
Thread subscription is off by default. Turn it on with
enableThreadSubscription in Global Configuration — no backend capability flag exists for the kit to feature-detect from, so whether the thread endpoints are deployed for your app is something only you know.(threadSubscriptionChange) on either surface:
[hideThreadSubscriptionToggle] on the thread header, or [hideThreadSubscriptionOption] on the message list.
See the Thread Subscription guide for the full feature — the service, the events, and the optimistic and revert behavior.
Feature Matrix
Next Steps
Message List
Render real-time message threads.
Thread Header
Customize the thread header component.
Thread Subscription
Notify users about new replies in a thread.
All Guides
Browse all feature and formatter guides.
Sample App
Full working sample application on GitHub.