@cometchat/skills 3.0.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -17
  3. package/bin/install.js +389 -43
  4. package/package.json +19 -9
  5. package/skills/cometchat/SKILL.md +1066 -265
  6. package/skills/cometchat-android-v5/SKILL.md +120 -0
  7. package/skills/cometchat-android-v5-components/SKILL.md +430 -0
  8. package/skills/cometchat-android-v5-core/SKILL.md +468 -0
  9. package/skills/cometchat-android-v5-customization/SKILL.md +305 -0
  10. package/skills/cometchat-android-v5-extensions/SKILL.md +124 -0
  11. package/skills/cometchat-android-v5-features/SKILL.md +130 -0
  12. package/skills/cometchat-android-v5-placement/SKILL.md +276 -0
  13. package/skills/cometchat-android-v5-production/SKILL.md +94 -0
  14. package/skills/cometchat-android-v5-push/SKILL.md +620 -0
  15. package/skills/cometchat-android-v5-testing/SKILL.md +187 -0
  16. package/skills/cometchat-android-v5-theming/SKILL.md +166 -0
  17. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +73 -0
  18. package/skills/cometchat-android-v6/SKILL.md +107 -0
  19. package/skills/cometchat-android-v6-builder-settings/SKILL.md +145 -0
  20. package/skills/cometchat-android-v6-compose-components/SKILL.md +202 -0
  21. package/skills/cometchat-android-v6-compose-customization/SKILL.md +280 -0
  22. package/skills/cometchat-android-v6-compose-placement/SKILL.md +213 -0
  23. package/skills/cometchat-android-v6-compose-theming/SKILL.md +224 -0
  24. package/skills/cometchat-android-v6-core/SKILL.md +354 -0
  25. package/skills/cometchat-android-v6-events/SKILL.md +212 -0
  26. package/skills/cometchat-android-v6-extensions/SKILL.md +191 -0
  27. package/skills/cometchat-android-v6-features/SKILL.md +130 -0
  28. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +197 -0
  29. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +268 -0
  30. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +248 -0
  31. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +202 -0
  32. package/skills/cometchat-android-v6-production/SKILL.md +187 -0
  33. package/skills/cometchat-android-v6-push/SKILL.md +274 -0
  34. package/skills/cometchat-android-v6-testing/SKILL.md +279 -0
  35. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +249 -0
  36. package/skills/cometchat-angular-components/SKILL.md +706 -0
  37. package/skills/cometchat-angular-core/SKILL.md +444 -0
  38. package/skills/cometchat-angular-customization/SKILL.md +424 -0
  39. package/skills/cometchat-angular-features/SKILL.md +447 -0
  40. package/skills/cometchat-angular-patterns/SKILL.md +447 -0
  41. package/skills/cometchat-angular-placement/SKILL.md +685 -0
  42. package/skills/cometchat-angular-production/SKILL.md +415 -0
  43. package/skills/cometchat-angular-theming/SKILL.md +365 -0
  44. package/skills/cometchat-angular-troubleshooting/SKILL.md +329 -0
  45. package/skills/cometchat-astro-patterns/SKILL.md +3 -3
  46. package/skills/cometchat-components/SKILL.md +11 -0
  47. package/skills/cometchat-core/SKILL.md +11 -6
  48. package/skills/cometchat-customization/references/component-catalog.md +1 -1
  49. package/skills/cometchat-features/SKILL.md +176 -108
  50. package/skills/cometchat-flutter-v5/SKILL.md +167 -0
  51. package/skills/cometchat-flutter-v5-calls/SKILL.md +192 -0
  52. package/skills/cometchat-flutter-v5-conversations/SKILL.md +117 -0
  53. package/skills/cometchat-flutter-v5-core/SKILL.md +221 -0
  54. package/skills/cometchat-flutter-v5-customization/SKILL.md +227 -0
  55. package/skills/cometchat-flutter-v5-events/SKILL.md +155 -0
  56. package/skills/cometchat-flutter-v5-messages/SKILL.md +258 -0
  57. package/skills/cometchat-flutter-v5-production/SKILL.md +207 -0
  58. package/skills/cometchat-flutter-v5-push/SKILL.md +284 -0
  59. package/skills/cometchat-flutter-v5-theming/SKILL.md +160 -0
  60. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +129 -0
  61. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +151 -0
  62. package/skills/cometchat-flutter-v6/SKILL.md +445 -0
  63. package/skills/cometchat-flutter-v6-calls/SKILL.md +333 -0
  64. package/skills/cometchat-flutter-v6-components/SKILL.md +365 -0
  65. package/skills/cometchat-flutter-v6-conversations/SKILL.md +210 -0
  66. package/skills/cometchat-flutter-v6-core/SKILL.md +305 -0
  67. package/skills/cometchat-flutter-v6-customization/SKILL.md +666 -0
  68. package/skills/cometchat-flutter-v6-events/SKILL.md +216 -0
  69. package/skills/cometchat-flutter-v6-features/SKILL.md +406 -0
  70. package/skills/cometchat-flutter-v6-messages/SKILL.md +333 -0
  71. package/skills/cometchat-flutter-v6-migration/SKILL.md +381 -0
  72. package/skills/cometchat-flutter-v6-placement/SKILL.md +398 -0
  73. package/skills/cometchat-flutter-v6-production/SKILL.md +632 -0
  74. package/skills/cometchat-flutter-v6-theming/SKILL.md +260 -0
  75. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +726 -0
  76. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +216 -0
  77. package/skills/cometchat-ios/SKILL.md +323 -0
  78. package/skills/cometchat-ios-components/SKILL.md +651 -0
  79. package/skills/cometchat-ios-core/SKILL.md +822 -0
  80. package/skills/cometchat-ios-customization/SKILL.md +825 -0
  81. package/skills/cometchat-ios-features/SKILL.md +725 -0
  82. package/skills/cometchat-ios-placement/SKILL.md +750 -0
  83. package/skills/cometchat-ios-production/SKILL.md +730 -0
  84. package/skills/cometchat-ios-push/SKILL.md +582 -0
  85. package/skills/cometchat-ios-theming/SKILL.md +631 -0
  86. package/skills/cometchat-ios-troubleshooting/SKILL.md +983 -0
  87. package/skills/cometchat-native-bare-patterns/SKILL.md +470 -0
  88. package/skills/cometchat-native-components/SKILL.md +594 -0
  89. package/skills/cometchat-native-core/SKILL.md +407 -0
  90. package/skills/cometchat-native-customization/SKILL.md +594 -0
  91. package/skills/cometchat-native-expo-patterns/SKILL.md +485 -0
  92. package/skills/cometchat-native-features/SKILL.md +608 -0
  93. package/skills/cometchat-native-placement/SKILL.md +500 -0
  94. package/skills/cometchat-native-production/SKILL.md +694 -0
  95. package/skills/cometchat-native-push/SKILL.md +593 -0
  96. package/skills/cometchat-native-testing/SKILL.md +583 -0
  97. package/skills/cometchat-native-theming/SKILL.md +656 -0
  98. package/skills/cometchat-native-troubleshooting/SKILL.md +433 -0
  99. package/skills/cometchat-nextjs-patterns/SKILL.md +5 -5
  100. package/skills/cometchat-production/SKILL.md +60 -0
  101. package/skills/cometchat-react-router-patterns/SKILL.md +23 -21
@@ -0,0 +1,216 @@
1
+ ---
2
+ name: cometchat-flutter-v6-events
3
+ description: >
4
+ Use when working with real-time events, SDK listeners, or UI event streams in
5
+ CometChat Flutter UIKit v6. Triggers on mentions of CometChatMessageEvents,
6
+ CometChatUserEvents, CometChatGroupEvents, CometChatCallEvents,
7
+ CometChatConversationEvents, MessageListener, UserListener, GroupListener,
8
+ CallListener, ConnectionListener, ccMessageSent, ccMessageEdited,
9
+ ccMessageDeleted, ccUserBlocked, ccUserUnblocked, ccGroupMemberKicked,
10
+ ccGroupMemberBanned, onMessageReceived, onTypingStarted, onTypingEnded,
11
+ onUserOnline, onUserOffline, onMessageDelivered, onMessageRead,
12
+ addMessageListener, removeMessageListener, ChatSDKEventInitializer,
13
+ or any real-time update handling in CometChat.
14
+ license: "MIT"
15
+ compatibility: "cometchat_chat_uikit ^6.0.0-beta2; cometchat_sdk ^4.1.2"
16
+ allowed-tools: "executeBash, readFile, readCode, fileSearch, listDirectory, grepSearch"
17
+ metadata:
18
+ author: "CometChat"
19
+ version: "3.0.0"
20
+ tags: "cometchat flutter events listeners real-time typing receipts presence"
21
+ ---
22
+
23
+ # CometChat Flutter UIKit — Events & Listeners
24
+
25
+ Two event systems: SDK listeners (from CometChat server) and UI events (from UIKit components).
26
+
27
+ ## SDK Listeners (Server → App)
28
+
29
+ Register on CometChat SDK directly. These fire when the server pushes real-time data.
30
+
31
+ ### Available Listener Types
32
+
33
+ | Listener Mixin | Register / Remove | Key Callbacks |
34
+ |----------------|-------------------|---------------|
35
+ | `MessageListener` | `CometChat.addMessageListener(id, this)` / `removeMessageListener(id)` | `onTextMessageReceived`, `onMediaMessageReceived`, `onCustomMessageReceived`, `onTypingStarted`, `onTypingEnded`, `onMessagesDelivered`, `onMessagesRead`, `onMessageEdited`, `onMessageDeleted` |
36
+ | `UserListener` | `CometChat.addUserListener(id, this)` / `removeUserListener(id)` | `onUserOnline`, `onUserOffline` |
37
+ | `GroupListener` | `CometChat.addGroupListener(id, this)` / `removeGroupListener(id)` | `onGroupMemberJoined`, `onGroupMemberLeft`, `onGroupMemberKicked`, `onGroupMemberBanned`, `onGroupMemberScopeChanged`, `onMemberAddedToGroup` |
38
+ | `CallListener` | `CometChat.addCallListener(id, this)` / `removeCallListener(id)` | `onIncomingCallReceived`, `onOutgoingCallAccepted`, `onOutgoingCallRejected`, `onIncomingCallCancelled` |
39
+ | `ConnectionListener` | `CometChat.addConnectionListener(id, this)` / `removeConnectionListener(id)` | `onConnected`, `onDisconnected`, `onConnecting`, `onFeatureThrottled` |
40
+
41
+ ### Registration Pattern
42
+
43
+ ```dart
44
+ class _MyScreenState extends State<MyScreen>
45
+ with MessageListener, UserListener {
46
+ late final String _listenerId;
47
+
48
+ @override
49
+ void initState() {
50
+ super.initState();
51
+ _listenerId = 'my_screen_${DateTime.now().millisecondsSinceEpoch}';
52
+ CometChat.addMessageListener(_listenerId, this);
53
+ CometChat.addUserListener(_listenerId, this);
54
+ }
55
+
56
+ @override
57
+ void dispose() {
58
+ CometChat.removeMessageListener(_listenerId);
59
+ CometChat.removeUserListener(_listenerId);
60
+ super.dispose();
61
+ }
62
+
63
+ @override
64
+ void onTextMessageReceived(TextMessage message) {
65
+ // Handle incoming text message
66
+ }
67
+
68
+ @override
69
+ void onUserOnline(User user) {
70
+ // Handle user coming online
71
+ }
72
+
73
+ @override
74
+ void onUserOffline(User user) {
75
+ // Handle user going offline
76
+ }
77
+ }
78
+ ```
79
+
80
+ ## UI Events (UIKit Component → App)
81
+
82
+ These fire when UIKit components perform actions. Use these to react to user interactions across components.
83
+
84
+ ### CometChatMessageEvents
85
+
86
+ ```dart
87
+ // Listen
88
+ CometChatMessageEvents.addMessagesListener('my_listener', MyMessageEventListener());
89
+
90
+ // Remove
91
+ CometChatMessageEvents.removeMessagesListener('my_listener');
92
+
93
+ // Key callbacks in CometChatMessageEventListener:
94
+ // ccMessageSent(BaseMessage message, MessageStatus status) — inProgress/sent/error
95
+ // ccMessageEdited(BaseMessage message, MessageEditStatus status)
96
+ // ccMessageDeleted(BaseMessage message, EventStatus status)
97
+ // ccMessageRead(BaseMessage message)
98
+ // ccLiveReaction(String reaction)
99
+ ```
100
+
101
+ ### CometChatUserEvents
102
+
103
+ ```dart
104
+ CometChatUserEvents.addUsersListener('my_listener', MyUserEventListener());
105
+ CometChatUserEvents.removeUsersListener('my_listener');
106
+
107
+ // Key callbacks:
108
+ // ccUserBlocked(User user)
109
+ // ccUserUnblocked(User user)
110
+ ```
111
+
112
+ ### CometChatGroupEvents
113
+
114
+ ```dart
115
+ CometChatGroupEvents.addGroupsListener('my_listener', MyGroupEventListener());
116
+ CometChatGroupEvents.removeGroupsListener('my_listener');
117
+
118
+ // Key callbacks:
119
+ // ccGroupMemberKicked(Action, User kickedUser, User kickedBy, Group)
120
+ // ccGroupMemberBanned(Action, User bannedUser, User bannedBy, Group)
121
+ // ccGroupMemberScopeChanged(Action, User updatedUser, String newScope, String oldScope, Group)
122
+ // ccGroupCreated(Group)
123
+ // ccGroupDeleted(Group)
124
+ // ccGroupLeft(Action, User, Group)
125
+ // ccOwnershipChanged(Group, GroupMember)
126
+ ```
127
+
128
+ ### CometChatConversationEvents
129
+
130
+ ```dart
131
+ CometChatConversationEvents.addConversationListListener('my_listener', MyConvListener());
132
+ CometChatConversationEvents.removeConversationListListener('my_listener');
133
+
134
+ // Key callbacks:
135
+ // ccConversationDeleted(Conversation)
136
+ ```
137
+
138
+ ## SDK vs UI Events — When to Use Which
139
+
140
+ | Scenario | Use |
141
+ |----------|-----|
142
+ | Incoming message from another user | SDK `MessageListener.onTextMessageReceived` |
143
+ | Current user sent a message via composer | UI `CometChatMessageEvents.ccMessageSent` |
144
+ | Another user comes online | SDK `UserListener.onUserOnline` |
145
+ | Current user blocked someone via UIKit | UI `CometChatUserEvents.ccUserBlocked` |
146
+ | Group member kicked by another admin | SDK `GroupListener.onGroupMemberKicked` |
147
+ | Current user kicked someone via UIKit | UI `CometChatGroupEvents.ccGroupMemberKicked` |
148
+
149
+ Key distinction: SDK listeners fire for remote events. UI events fire for local user actions performed through UIKit components.
150
+
151
+ ## BLoC Components Handle Listeners Automatically
152
+
153
+ The UIKit BLoCs (`ConversationsBloc`, `MessageListBloc`, etc.) register all necessary SDK listeners internally. You do NOT need to register listeners for components you're using — they handle their own real-time updates.
154
+
155
+ Register your own listeners only when you need to:
156
+ - Update custom UI outside UIKit components
157
+ - Track events for analytics
158
+ - Sync state between screens
159
+
160
+ ## ChatSDKEventInitializer
161
+
162
+ Called automatically by `CometChatUIKit._initiateAfterLogin()`. Bridges SDK events to UIKit's internal event bus. You never need to call this manually.
163
+
164
+ ## Gotchas
165
+
166
+ - Listener IDs MUST be unique per registration. Using the same ID overwrites the previous listener silently — no error thrown, old listener just stops receiving events.
167
+ - `onTypingStarted`/`onTypingEnded` only fire if `subscriptionType` was set in `UIKitSettings`. Omitting it silently disables all presence/typing events.
168
+ - SDK listeners fire on the main isolate. Heavy processing in callbacks blocks the UI thread. Offload to `compute()` if needed.
169
+ - `ccMessageSent` fires three times per message: once with `MessageStatus.inProgress`, once with `MessageStatus.sent` (success), or once with `MessageStatus.error` (failure). Filter by status.
170
+ - Connection listener's `onConnected` fires on reconnect — use it to trigger a silent refresh of your data.
171
+ - Group listener callbacks include an `Action` object (which is a `BaseMessage` subclass). Don't confuse it with the `Action` widget from Flutter.
172
+
173
+ ## Anti-Patterns
174
+
175
+ ```dart
176
+ // ❌ WRONG — hardcoded listener ID causes silent overwrite
177
+ CometChat.addMessageListener('messages', this);
178
+ // Later, another screen does the same:
179
+ CometChat.addMessageListener('messages', this); // First listener silently lost!
180
+
181
+ // ✅ CORRECT — unique ID per instance
182
+ final id = 'screen_${DateTime.now().millisecondsSinceEpoch}';
183
+ CometChat.addMessageListener(id, this);
184
+ ```
185
+
186
+ ```dart
187
+ // ❌ WRONG — registering SDK listeners for a UIKit component you're already using
188
+ // ConversationsBloc already handles MessageListener, UserListener, GroupListener internally
189
+ CometChat.addMessageListener('redundant', this); // Duplicate handling
190
+
191
+ // ✅ CORRECT — only register for custom logic outside UIKit components
192
+ // Let ConversationsBloc handle its own listeners
193
+ ```
194
+
195
+ ```dart
196
+ // ❌ WRONG — not filtering ccMessageSent status
197
+ void onCcMessageSent(BaseMessage msg, MessageStatus status) {
198
+ addToList(msg); // Adds 3 times! (inProgress + sent + error)
199
+ }
200
+
201
+ // ✅ CORRECT — filter by status
202
+ void onCcMessageSent(BaseMessage msg, MessageStatus status) {
203
+ if (status == MessageStatus.sent) {
204
+ addToList(msg);
205
+ }
206
+ }
207
+ ```
208
+
209
+ ## Checklist
210
+
211
+ - [ ] Listener IDs are unique (use timestamp or UUID suffix)
212
+ - [ ] All listeners registered in `initState()` are removed in `dispose()`
213
+ - [ ] `subscriptionType` set in UIKitSettings for presence/typing events
214
+ - [ ] `ccMessageSent` handlers filter by `MessageStatus`
215
+ - [ ] No redundant listeners for UIKit components that handle their own
216
+ - [ ] `Action` from CometChat SDK not confused with Flutter's `Action` widget (use `import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart' as cc;` and `cc.Action`)
@@ -0,0 +1,406 @@
1
+ ---
2
+ name: cometchat-flutter-v6-features
3
+ description: >
4
+ Enable and configure features in CometChat Flutter UIKit v6 — calls, reactions,
5
+ smart replies, conversation starters, stickers, mentions, rich text formatting,
6
+ message translation, link preview, and AI features. Covers what's auto-enabled,
7
+ what needs UIKitSettings flags, what's enabled by `cometchat apply-feature <id>`,
8
+ and what needs manual dashboard configuration (third-party API keys).
9
+ license: "MIT"
10
+ compatibility: "cometchat_chat_uikit ^6.0.0-beta2"
11
+ allowed-tools: "executeBash, readFile, readCode, fileSearch, listDirectory, grepSearch"
12
+ metadata:
13
+ author: "CometChat"
14
+ version: "3.0.0"
15
+ tags: "cometchat flutter features calls reactions stickers ai smart-replies extensions"
16
+ ---
17
+
18
+ # CometChat Flutter UIKit v6 — Features
19
+
20
+ How to enable, configure, and disable features in `cometchat_chat_uikit`.
21
+
22
+ ## 1. Feature Categories
23
+
24
+ Every feature falls into one of three categories:
25
+
26
+ | Category | What it means | Example features | How to enable |
27
+ |---|---|---|---|
28
+ | **Auto-enabled** | Works out of the box when you render the standard components | Text/media messages, typing indicators, read receipts, reactions, message editing/deletion, threaded replies, @mentions | Just render `CometChatMessageHeader` + `CometChatMessageList` + `CometChatMessageComposer` |
29
+ | **UIKitSettings flag** | Set a property on `UIKitSettingsBuilder` before `CometChatUIKit.init()` | Voice/video calls (`enableCalls: true`), presence/typing (`subscriptionType`) | Set the flag → init |
30
+ | **Extension** | Backend extension, pure boolean toggle. CLI flips via the dashboard API. | Polls, stickers, message translation, link preview, collaborative document, collaborative whiteboard, image moderation, thumbnail generation | `cometchat apply-feature <id> --app-id <X>` → restart app |
31
+ | **AI feature** | Backend AI feature requiring an OpenAI API key on the app's AI settings | Smart replies, conversation starters, conversation summary | `cometchat apply-feature <id> --app-id <X> --openai-key sk-...` → restart app |
32
+ | **Dashboard-only** | Third-party API key / multi-field config the user must enter themselves | Giphy, Stipop, Tenor, Chatwoot, Intercom, Disappearing Messages, Message Shortcuts | Open https://app.cometchat.com → Extensions → enter config → enable |
33
+
34
+ ## 2. Auto-Enabled Features
35
+
36
+ These work immediately when you render the standard message components:
37
+
38
+ | Feature | Component | Notes |
39
+ |---|---|---|
40
+ | Text messages | `CometChatMessageList` + `CometChatMessageComposer` | Default message type |
41
+ | Image/video/audio/file messages | `CometChatMessageComposer` attachment options | Media picker built in |
42
+ | Read receipts | `CometChatMessageList` | Blue double-check. Disable with `disableReceipts: true` |
43
+ | Typing indicators | `CometChatMessageHeader` subtitle | Requires `subscriptionType` set in UIKitSettings |
44
+ | Reactions | `CometChatMessageList` | Long-press any message. Disable with `disableReactions: true` |
45
+ | Message editing/deletion | `CometChatMessageList` long-press menu | Own messages only |
46
+ | Threaded replies | `CometChatMessageList` | Controlled by `hideReplyInThreadOption` |
47
+ | Reply (quote) | `CometChatMessageList` | Swipe-to-reply via `enableSwipeToReply: true` (default) |
48
+ | @Mentions | `CometChatMessageComposer` | Type `@` to trigger. Uses `CometChatMentionsFormatter` |
49
+ | Rich text (markdown) | `CometChatMessageComposer` | Bold, italic, strikethrough, code, lists, blockquote, links via WYSIWYG toolbar |
50
+ | Group action messages | `CometChatMessageList` | Member joined/left/kicked. Hide with `hideGroupActionMessages: true` |
51
+
52
+ ## 3. UIKitSettings Features
53
+
54
+ Set these on `UIKitSettingsBuilder` before calling `CometChatUIKit.init()`:
55
+
56
+ ### Calls
57
+
58
+ ```dart
59
+ final settings = (UIKitSettingsBuilder()
60
+ ..appId = 'YOUR_APP_ID'
61
+ ..region = 'us'
62
+ ..authKey = 'YOUR_AUTH_KEY'
63
+ ..subscriptionType = CometChatSubscriptionType.allUsers
64
+ ..enableCalls = true // ← enables voice & video calls
65
+ ..callingConfiguration = CallingConfiguration(
66
+ outgoingCallConfiguration: CometChatOutgoingCallConfiguration(...),
67
+ incomingCallConfiguration: CometChatIncomingCallConfiguration(...),
68
+ callButtonsConfiguration: CallButtonsConfiguration(...),
69
+ groupSessionSettingsBuilder: sessionSettingsBuilder,
70
+ ))
71
+ .build();
72
+ ```
73
+
74
+ When `enableCalls` is `true`, the UIKit:
75
+ 1. Initializes `CometChatUIKitCalls` after chat SDK init
76
+ 2. Registers call message templates (call bubbles in message list)
77
+ 3. Shows voice/video call buttons in `CometChatMessageHeader`
78
+
79
+ For detailed call implementation, see the `cometchat-flutter-v6-calls` skill.
80
+
81
+ ### Presence & Typing
82
+
83
+ ```dart
84
+ ..subscriptionType = CometChatSubscriptionType.allUsers
85
+ ```
86
+
87
+ Options: `allUsers`, `roles`, `friends`. Controls which users' presence and typing events you receive.
88
+
89
+ ### Date/Time Formatting
90
+
91
+ ```dart
92
+ ..dateTimeFormatterCallback = (DateTime dateTime) => 'custom format'
93
+ ```
94
+
95
+ ## 4. Backend Toggle Features (CLI)
96
+
97
+ These are backend extensions / AI features. Flutter projects don't write `.cometchat/state.json`, so call the CLI in stateless mode:
98
+
99
+ ```bash
100
+ # Pure boolean extensions:
101
+ cometchat apply-feature polls --app-id <your-app-id>
102
+ cometchat apply-feature link-preview --app-id <your-app-id>
103
+
104
+ # AI features (require OpenAI key first time):
105
+ cometchat apply-feature smart-replies --app-id <your-app-id> --openai-key sk-...
106
+ ```
107
+
108
+ Requires `cometchat auth login` once per machine. Once enabled, the UIKit auto-wires the UI.
109
+
110
+ For dashboard-only extensions (Giphy, Stipop, Tenor, Chatwoot, Intercom — they need third-party API keys / webhooks), use https://app.cometchat.com → Extensions.
111
+
112
+ | Extension | UI surface when enabled | Extension directory |
113
+ |---|---|---|
114
+ | Polls | "Create Poll" option in composer attachment menu | `extensions/polls/` |
115
+ | Stickers | Sticker picker button next to composer | `extensions/stickers/` |
116
+ | Smart Replies | Chip suggestions above composer after incoming message | AI view: `views/ai_smart_replies/` |
117
+ | Conversation Starters | Suggested messages when chat is empty | AI view: `views/ai_conversation_starter/` |
118
+ | Conversation Summary | Summary panel above composer | AI view: `views/ai_conversation_summary/` |
119
+ | Message Translation | "Translate" option in message long-press menu | `extensions/message_translation/` |
120
+ | Link Preview | Rich preview card for URLs in messages | `extensions/link_preview/` |
121
+ | Collaborative Document | "Document" option in composer attachment menu | `extensions/collaborative_document/` |
122
+ | Collaborative Whiteboard | "Whiteboard" option in composer attachment menu | `extensions/collaborative_whiteboard/` |
123
+ | Image Moderation | Blurs inappropriate images automatically | `extensions/image_moderation/` |
124
+ | Thumbnail Generation | Auto-generates thumbnails for images/videos | `extensions/thumbnail_generation/` |
125
+
126
+ ## 5. Calls
127
+
128
+ Voice and video calling for 1:1 and group conversations. Built into `cometchat_chat_uikit` — no separate package.
129
+
130
+ ```dart
131
+ // Enable in UIKitSettings
132
+ ..enableCalls = true
133
+
134
+ // Call buttons appear automatically in CometChatMessageHeader
135
+ CometChatMessageHeader(
136
+ user: user,
137
+ group: group,
138
+ hideVoiceCallButton: false, // default
139
+ hideVideoCallButton: false, // default
140
+ )
141
+ ```
142
+
143
+ `CallingConfiguration` bundles all call component configs:
144
+
145
+ ```dart
146
+ CallingConfiguration(
147
+ outgoingCallConfiguration: CometChatOutgoingCallConfiguration(...),
148
+ incomingCallConfiguration: CometChatIncomingCallConfiguration(...),
149
+ callButtonsConfiguration: CallButtonsConfiguration(...),
150
+ groupSessionSettingsBuilder: sessionSettingsBuilder,
151
+ )
152
+ ```
153
+
154
+ For the full call flow, init sequence, and gotchas, see the `cometchat-flutter-v6-calls` skill.
155
+
156
+ ## 6. AI Features
157
+
158
+ AI features require enabling the corresponding extension in the CometChat dashboard. The UIKit provides built-in views for each.
159
+
160
+ ### Smart Replies
161
+
162
+ Suggested reply chips shown above the composer after receiving a message.
163
+
164
+ ```dart
165
+ CometChatMessageList(
166
+ user: user,
167
+ group: group,
168
+ enableSmartReplies: true,
169
+ smartRepliesDelayDuration: 10000, // ms before showing suggestions
170
+ smartRepliesKeywords: ['what', 'when', 'why', 'who', 'where', 'how', '?'],
171
+ )
172
+ ```
173
+
174
+ ### Conversation Starters
175
+
176
+ Suggested messages shown when the chat is empty to help start a conversation.
177
+
178
+ ```dart
179
+ CometChatMessageList(
180
+ user: user,
181
+ group: group,
182
+ enableConversationStarters: true,
183
+ )
184
+ ```
185
+
186
+ ### Conversation Summary
187
+
188
+ A summary of the conversation shown in a panel. Available via the AI option sheet in the message header.
189
+
190
+ ### AI Assistant
191
+
192
+ Full AI chat assistant with chat history. Uses Clean Architecture + BLoC at `chat_ui/src/ai_assistant_chat_history/`. The chat history button appears in `CometChatMessageHeader` for AI-type users.
193
+
194
+ Related props on `CometChatMessageHeader`:
195
+ - `hideChatHistoryButton` — hide the AI chat history button
196
+ - `hideNewChatButton` — hide the new AI chat button
197
+ - `chatHistoryButtonClick` — custom callback for chat history tap
198
+ - `newChatButtonClick` — custom callback for new chat tap
199
+
200
+ ## 7. Rich Text & Formatters
201
+
202
+ The composer supports rich text formatting via the WYSIWYG toolbar (bold, italic, strikethrough, inline code, ordered/bullet lists, blockquote, links, code blocks).
203
+
204
+ ### Text Formatters
205
+
206
+ Pass `textFormatters` to both `CometChatMessageList` and `CometChatMessageComposer` for consistent rendering:
207
+
208
+ ```dart
209
+ // Available formatters (in shared_ui/src/formatter/)
210
+ // - CometChatMentionsFormatter — @mention users
211
+ // - CometChatUrlFormatter — auto-link URLs
212
+ // - CometChatPhoneNumberFormatter — auto-link phone numbers
213
+ // - CometChatEmailFormatter — auto-link emails
214
+ // - MarkdownTextFormatter — render markdown in bubbles
215
+
216
+ CometChatMessageList(
217
+ user: user,
218
+ group: group,
219
+ textFormatters: [
220
+ CometChatMentionsFormatter(),
221
+ CometChatUrlFormatter(),
222
+ ],
223
+ )
224
+
225
+ CometChatMessageComposer(
226
+ user: user,
227
+ group: group,
228
+ textFormatters: [
229
+ CometChatMentionsFormatter(),
230
+ ],
231
+ )
232
+ ```
233
+
234
+ ### Mentions
235
+
236
+ `CometChatMentionsFormatter` is the primary formatter for @mentions. Type `@` in the composer to trigger the user suggestion list.
237
+
238
+ Related props:
239
+ - `disableMentions` — disable @mention suggestions on both list and composer
240
+ - `disableMentionAll` — disable the @all mention option (composer)
241
+ - `mentionAllLabel` / `mentionAllLabelId` — customize the @all label
242
+
243
+ ### Rich Text Toolbar
244
+
245
+ The composer's WYSIWYG toolbar is the active formatting system. Configure via:
246
+
247
+ ```dart
248
+ CometChatMessageComposer(
249
+ user: user,
250
+ group: group,
251
+ richTextConfiguration: RichTextConfiguration(...),
252
+ richTextToolbarView: (context) => CustomToolbar(),
253
+ onRichTextFormatApplied: (formatType) { },
254
+ )
255
+ ```
256
+
257
+ ## 8. Reactions
258
+
259
+ Reactions are auto-enabled. Users long-press a message to add emoji reactions.
260
+
261
+ ### Disabling Reactions
262
+
263
+ ```dart
264
+ CometChatMessageList(
265
+ user: user,
266
+ group: group,
267
+ disableReactions: true, // hides reaction UI entirely
268
+ )
269
+ ```
270
+
271
+ ### Customizing Reactions
272
+
273
+ ```dart
274
+ CometChatMessageList(
275
+ user: user,
276
+ group: group,
277
+ favoriteReactions: ['👍', '❤️', '😂', '😮', '😢', '🙏'],
278
+ addReactionIcon: Icon(Icons.add_reaction),
279
+ onReactionClick: (reaction) { },
280
+ onReactionLongPress: (reaction) { },
281
+ onReactionListItemClick: (reaction) { },
282
+ reactionsRequestBuilder: ReactionsRequestBuilder()..limit = 10,
283
+ hideReactionOption: true, // hide "React" from long-press menu
284
+ )
285
+ ```
286
+
287
+ ## 9. Disabling Features
288
+
289
+ Most features can be hidden or disabled via component props.
290
+
291
+ ### CometChatMessageHeader
292
+
293
+ | Prop | Type | Effect |
294
+ |---|---|---|
295
+ | `hideVoiceCallButton` | `bool?` | Hide voice call button |
296
+ | `hideVideoCallButton` | `bool?` | Hide video call button |
297
+ | `hideChatHistoryButton` | `bool?` | Hide AI chat history button |
298
+ | `hideNewChatButton` | `bool?` | Hide new AI chat button |
299
+ | `usersStatusVisibility` | `bool?` | Show/hide online status indicator |
300
+
301
+ ### CometChatMessageList
302
+
303
+ | Prop | Type | Default | Effect |
304
+ |---|---|---|---|
305
+ | `disableReactions` | `bool` | `false` | Disable all reaction UI |
306
+ | `disableReceipts` | `bool` | `false` | Hide read/delivered receipts |
307
+ | `disableSoundForMessages` | `bool` | `false` | Mute message sounds |
308
+ | `hideDeletedMessages` | `bool` | `false` | Hide deleted message placeholders |
309
+ | `hideReplies` | `bool` | `true` | Hide reply count on messages |
310
+ | `hideThreadView` | `bool?` | — | Hide thread reply indicator |
311
+ | `hideDateSeparator` | `bool` | `false` | Hide date separators |
312
+ | `hideStickyDate` | `bool` | `false` | Hide sticky date header |
313
+ | `hideGroupActionMessages` | `bool` | `false` | Hide "X joined" / "X left" messages |
314
+ | `hideReplyInThreadOption` | `bool` | `false` | Remove "Reply in Thread" from long-press menu |
315
+ | `hideReplyOption` | `bool` | `false` | Remove "Reply" from long-press menu |
316
+ | `hideCopyMessageOption` | `bool` | `false` | Remove "Copy" from long-press menu |
317
+ | `hideDeleteMessageOption` | `bool` | `false` | Remove "Delete" from long-press menu |
318
+ | `hideEditMessageOption` | `bool` | `false` | Remove "Edit" from long-press menu |
319
+ | `hideMessageInfoOption` | `bool` | `false` | Remove "Message Info" from long-press menu |
320
+ | `hideMessagePrivatelyOption` | `bool` | `false` | Remove "Message Privately" from long-press menu |
321
+ | `hideReactionOption` | `bool` | `false` | Remove "React" from long-press menu |
322
+ | `hideTranslateMessageOption` | `bool` | `false` | Remove "Translate" from long-press menu |
323
+ | `hideShareMessageOption` | `bool` | `false` | Remove "Share" from long-press menu |
324
+ | `hideSuggestedMessages` | `bool` | `false` | Hide AI suggested messages |
325
+ | `enableSmartReplies` | `bool` | `false` | Enable smart reply suggestions |
326
+ | `enableConversationStarters` | `bool` | `false` | Enable conversation starter suggestions |
327
+ | `enableSwipeToReply` | `bool` | `true` | Enable swipe-to-reply gesture |
328
+
329
+ ### CometChatMessageComposer
330
+
331
+ | Prop | Type | Effect |
332
+ |---|---|---|
333
+ | `hideVoiceRecordingButton` | `bool?` | Hide voice recording button |
334
+ | `hideSendButton` | `bool?` | Hide send button |
335
+ | `hideAttachmentButton` | `bool?` | Hide attachment (paperclip) button |
336
+ | `hideStickersButton` | `bool?` | Hide stickers button |
337
+ | `hidePollsOption` | `bool?` | Hide "Create Poll" from attachment menu |
338
+ | `hideCollaborativeDocumentOption` | `bool?` | Hide "Document" from attachment menu |
339
+ | `hideCollaborativeWhiteboardOption` | `bool?` | Hide "Whiteboard" from attachment menu |
340
+ | `hideAudioAttachmentOption` | `bool?` | Hide audio from attachment menu |
341
+ | `hideFileAttachmentOption` | `bool?` | Hide file from attachment menu |
342
+ | `hideImageAttachmentOption` | `bool?` | Hide image from attachment menu |
343
+ | `hideVideoAttachmentOption` | `bool?` | Hide video from attachment menu |
344
+ | `hideTakePhotoOption` | `bool?` | Hide "Take Photo" from attachment menu |
345
+ | `disableTypingEvents` | `bool` | Stop sending typing indicators |
346
+ | `disableSoundForMessages` | `bool` | Mute send message sound |
347
+ | `disableMentions` | `bool?` | Disable @mention suggestions |
348
+ | `disableMentionAll` | `bool` | Disable @all mention |
349
+
350
+ ## Extensions Directory
351
+
352
+ All extension implementations live under `chat_ui/src/extensions/`:
353
+
354
+ ```
355
+ extensions/
356
+ ├── collaborative/ # Shared collaborative bubble
357
+ ├── collaborative_document/ # Document extension
358
+ ├── collaborative_whiteboard/ # Whiteboard extension
359
+ ├── image_moderation/ # Image moderation filter
360
+ ├── link_preview/ # Link preview bubble
361
+ ├── message_translation/ # Translation bubble + option
362
+ ├── polls/ # Poll creation + bubble
363
+ ├── stickers/ # Sticker keyboard + bubble
364
+ ├── thumbnail_generation/ # Thumbnail config
365
+ ├── extension_constants.dart # Extension ID constants
366
+ ├── extension_moderator.dart # Extension moderator
367
+ └── extension.dart # Base extension class
368
+ ```
369
+
370
+ ## Quick Reference — Enabling Everything
371
+
372
+ ```dart
373
+ final settings = (UIKitSettingsBuilder()
374
+ ..appId = 'YOUR_APP_ID'
375
+ ..region = 'us'
376
+ ..authKey = 'YOUR_AUTH_KEY'
377
+ ..subscriptionType = CometChatSubscriptionType.allUsers
378
+ ..enableCalls = true)
379
+ .build();
380
+
381
+ await CometChatUIKit.init(uiKitSettings: settings);
382
+
383
+ // Then in your messages screen:
384
+ CometChatMessageList(
385
+ user: user,
386
+ group: group,
387
+ enableSmartReplies: true,
388
+ enableConversationStarters: true,
389
+ enableSwipeToReply: true,
390
+ textFormatters: [CometChatMentionsFormatter()],
391
+ )
392
+
393
+ CometChatMessageComposer(
394
+ user: user,
395
+ group: group,
396
+ textFormatters: [CometChatMentionsFormatter()],
397
+ )
398
+
399
+ CometChatMessageHeader(
400
+ user: user,
401
+ group: group,
402
+ // Call buttons shown automatically when enableCalls = true
403
+ )
404
+ ```
405
+
406
+ Dashboard extensions (polls, stickers, translation, link preview, collaborative doc/whiteboard) are auto-wired once enabled in the CometChat dashboard — no code changes needed.