AI Integration Quick Reference
AI Integration Quick Reference
Components
Integration Steps
1. Thread State Management
Store the parent message that the user clicked “Reply in Thread” on. When set, update the app state to show the threaded messages side panel. File: CometChatHome.tsx2. Thread Trigger in Group Messages
Wire theonThreadRepliesClick callback on CometChatMessages. When a user clicks the thread reply icon on any message, this fires with the parent message object.
File: CometChatHome.tsx
3. Threaded Messages Component
Render the thread panel with the parent message, reply list, and composer.goToMessageId and searchKeyword support in-thread search navigation.
File: CometChatHome.tsx
4. App State Management
Add reducer cases to store the threaded message and control the side panel visibility. These are dispatched byupdateThreadedMessage in step 1.
File: appReducer.ts
Implementation Flow
Fetch the parent message, load replies, send new replies, and handle live updates:Feature Matrix
Next Steps
Message List
Render real-time message threads.
Thread Header
Customize the thread header component.
All Guides
Browse all feature and formatter guides.
Sample App
Full working sample application on GitHub.