@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,447 @@
1
+ ---
2
+ name: cometchat-angular-features
3
+ description: "Feature catalog for Angular — calls (separate SDK), extensions (polls / stickers / translation / link preview / collaborative doc / whiteboard), AI features (smart replies / conversation summary / conversation starter), AI agent. Six-bucket taxonomy: default / extension / ai-feature / dashboard-only / package-install / component-swap."
4
+ license: "MIT"
5
+ compatibility: "Angular >=12 <=15; @cometchat/chat-uikit-angular ^4; @cometchat/chat-sdk-javascript ^4"
6
+ allowed-tools: "executeBash, readFile, fileSearch, listDirectory, AskUserQuestion"
7
+ metadata:
8
+ author: "CometChat"
9
+ version: "3.0.0"
10
+ tags: "cometchat angular features calls extensions ai polls stickers"
11
+ ---
12
+
13
+ ## Purpose
14
+
15
+ Teaches Claude how to add features on top of a working CometChat Angular integration. Classifies each feature into one of four types and gives the correct recipe for each.
16
+
17
+ **Read `cometchat-angular-core` + `cometchat-angular-components` + `cometchat-angular-patterns` first** — a base integration must already exist before features layer on.
18
+
19
+ Ground truth: `docs/ui-kit/angular/core-features`, `docs/ui-kit/angular/calling-integration`, `docs/ui-kit/angular/extensions`, `docs/ui-kit/angular/guide-ai-agent`, and `@cometchat/chat-uikit-angular@4.x` exports.
20
+
21
+ ---
22
+
23
+ ## 1. Feature taxonomy
24
+
25
+ Every CometChat feature falls into exactly one of four categories:
26
+
27
+ | Category | What it means | Example features | How to enable |
28
+ |---|---|---|---|
29
+ | **Default** | Already on — no action needed. Shipped with the kit's base components. | Instant messaging, typing indicators, read receipts, reactions, replies, @mentions, media upload, edit/delete, message info | Just render `<cometchat-message-header>` + `<cometchat-message-list>` + `<cometchat-message-composer>` |
30
+ | **Extension** | Boolean backend toggle. CLI flips it via the dashboard API. UI Kit auto-wires once enabled. | Polls, stickers, message translation, link preview, collaborative doc/whiteboard, thumbnail generation | `cometchat apply-feature <id> --app-id <X>` → hard-reload |
31
+ | **AI feature** | Backend AI toggle that requires an OpenAI API key. CLI sets the key + flips the toggle. | Smart replies, conversation summary, conversation starter | `cometchat apply-feature smart-replies --app-id <X> --openai-key sk-…` |
32
+ | **Dashboard-only** | Third-party API key / multi-field config the user has to supply. CLI cannot automate. | Giphy, Stipop, Tenor, Chatwoot, Intercom, Disappearing Messages, Message Shortcuts | Open https://app.cometchat.com → Extensions |
33
+ | **Package-install** | Install an additional npm package. The UI Kit auto-detects the package on next init. | Voice + video calls (`@cometchat/calls-sdk-javascript`) | `npm install ...` → rebuild |
34
+ | **Component-swap** | Replace or wrap a UI Kit component with a customized version. | Custom text formatter, custom message templates, AI Agent chat history | Write a new component + pass via Angular input |
35
+
36
+ ---
37
+
38
+ ## 2. Enabling extension and AI features (`apply-feature`)
39
+
40
+ Angular projects don't go through `cometchat apply` (no `.cometchat/state.json`), so always pass `--app-id <id>` explicitly. The CLI hits the dashboard API using the bearer from `cometchat auth login`.
41
+
42
+ ### Extension features
43
+
44
+ ```bash
45
+ cometchat apply-feature polls --app-id <your-app-id>
46
+ cometchat apply-feature link-preview --app-id <your-app-id>
47
+ ```
48
+
49
+ ### AI features (smart replies, conversation summary, conversation starter)
50
+
51
+ These need an OpenAI API key on the app. The CLI sets the key + flips the toggle in one call:
52
+
53
+ ```bash
54
+ cometchat apply-feature smart-replies --app-id <your-app-id> --openai-key sk-...
55
+ ```
56
+
57
+ The key is stored on the app once, so subsequent ai-feature applies don't need `--openai-key` repeated. Get one at https://platform.openai.com/api-keys.
58
+
59
+ ### Response shapes
60
+
61
+ - `"status": "applied"` → done. Hard-reload the Angular dev server.
62
+ - `"status": "already-applied"` → already in the desired state.
63
+ - `"status": "auth-required"` → `cometchat auth login` first.
64
+ - `"status": "openai-key-required"` → re-run with `--openai-key sk-…`.
65
+ - `"status": "manual-action-required"` → dashboard-only feature (Giphy, Stipop, Tenor, Chatwoot, Intercom, message-shortcuts, disappearing-messages). Surface `next_steps` verbatim — these need third-party config.
66
+ - `"status": "error"` → surface `next_steps`.
67
+
68
+ ### Dashboard fallback
69
+
70
+ Only when the CLI returns `error` or isn't available:
71
+ 1. https://app.cometchat.com → your app
72
+ 2. Chat & Messaging → Features
73
+ 3. Find the extension by name → flip Status ON
74
+ 4. Hard-reload the Angular app (`ng serve` restart or browser refresh)
75
+
76
+ ### What each toggle does
77
+
78
+ | Extension | UI surface when enabled |
79
+ |---|---|
80
+ | Polls | Polls option in `<cometchat-message-composer>`'s attachment menu |
81
+ | Stickers | Sticker picker in the composer |
82
+ | Smart replies | Chip suggestions above the composer input after an incoming message |
83
+ | Message translation | "Translate" option in the message long-press menu |
84
+ | Link preview | Rich-card bubble for URLs in the message list |
85
+ | Collaborative document | Option in composer's attachment menu; opens a shared doc on click |
86
+ | Collaborative whiteboard | Option in composer's attachment menu; opens a shared canvas |
87
+ | Thumbnail generation | Image / video bubbles show thumbnails instead of full-size downloads |
88
+
89
+ ### Gotcha — `auto_wired_in_uikit: false`
90
+
91
+ A minority of extensions need extra wiring via the `extensions` field on `UIKitSettingsBuilder`. The CLI flags this in its success response:
92
+
93
+ ```json
94
+ {
95
+ "status": "enabled",
96
+ "name": "stickers",
97
+ "auto_wired_in_uikit": false,
98
+ "next_steps": ["Pass the extension via the extensions field on UIKitSettingsBuilder"]
99
+ }
100
+ ```
101
+
102
+ If `auto_wired_in_uikit` is `false`, import the matching `ExtensionsDataSource` and pass it via `.setExtensions()` on the builder:
103
+
104
+ ```typescript
105
+ import { UIKitSettingsBuilder } from "@cometchat/uikit-shared";
106
+ import { StickersExtension, PollsExtension } from "@cometchat/chat-uikit-angular";
107
+
108
+ const settings = new UIKitSettingsBuilder()
109
+ .setAppId(APP_ID)
110
+ .setRegion(REGION)
111
+ .setAuthKey(AUTH_KEY)
112
+ .setExtensions([new StickersExtension(), new PollsExtension()])
113
+ .build();
114
+ ```
115
+
116
+ ---
117
+
118
+ ## 3. Calls (package-install)
119
+
120
+ Calls require the separate `@cometchat/calls-sdk-javascript` package.
121
+
122
+ ### 3a — Install the calls SDK
123
+
124
+ ```bash
125
+ npm install @cometchat/calls-sdk-javascript
126
+ ```
127
+
128
+ No native peer deps needed for web (unlike React Native). Rebuild the Angular app after installing.
129
+
130
+ ### 3b — Register the call listener at the app root
131
+
132
+ The incoming-call UI only shows up if you've registered a listener. Add this to `AppComponent`:
133
+
134
+ ```typescript
135
+ // app.component.ts
136
+ import { Component, OnInit, OnDestroy } from "@angular/core";
137
+ import { CometChat } from "@cometchat/chat-sdk-javascript";
138
+ import { CometChatIncomingCall } from "@cometchat/chat-uikit-angular";
139
+
140
+ @Component({
141
+ selector: "app-root",
142
+ template: `
143
+ <router-outlet></router-outlet>
144
+ <cometchat-incoming-call
145
+ *ngIf="incomingCall"
146
+ [call]="incomingCall"
147
+ [onAccept]="handleAccept"
148
+ [onDecline]="handleDecline"
149
+ ></cometchat-incoming-call>
150
+ `,
151
+ })
152
+ export class AppComponent implements OnInit, OnDestroy {
153
+ incomingCall: CometChat.Call | null = null;
154
+ private readonly LISTENER_ID = "APP_CALL_LISTENER";
155
+
156
+ ngOnInit(): void {
157
+ CometChat.addCallListener(
158
+ this.LISTENER_ID,
159
+ new CometChat.CallListener({
160
+ onIncomingCallReceived: (call: CometChat.Call) => {
161
+ this.incomingCall = call;
162
+ },
163
+ onOutgoingCallAccepted: () => {
164
+ // navigate to ongoing-call route
165
+ },
166
+ onOutgoingCallRejected: () => {
167
+ this.incomingCall = null;
168
+ },
169
+ onIncomingCallCancelled: () => {
170
+ this.incomingCall = null;
171
+ },
172
+ onCallEndedMessageReceived: () => {
173
+ this.incomingCall = null;
174
+ },
175
+ })
176
+ );
177
+ }
178
+
179
+ ngOnDestroy(): void {
180
+ CometChat.removeCallListener(this.LISTENER_ID);
181
+ }
182
+
183
+ handleAccept = (call: CometChat.Call): void => {
184
+ this.incomingCall = null;
185
+ // navigate to /ongoing-call
186
+ };
187
+
188
+ handleDecline = (): void => {
189
+ this.incomingCall = null;
190
+ };
191
+ }
192
+ ```
193
+
194
+ ### 3c — Call buttons in the message header
195
+
196
+ Once the calls SDK is installed, add `<cometchat-call-buttons>` to the message header's `[menu]` slot:
197
+
198
+ ```html
199
+ <!-- messages.component.html -->
200
+ <cometchat-message-header
201
+ [user]="selectedUser"
202
+ [menu]="callButtonsTemplate"
203
+ ></cometchat-message-header>
204
+
205
+ <ng-template #callButtonsTemplate>
206
+ <cometchat-call-buttons
207
+ [user]="selectedUser"
208
+ [onVoiceCallClick]="handleVoiceCall"
209
+ [onVideoCallClick]="handleVideoCall"
210
+ ></cometchat-call-buttons>
211
+ </ng-template>
212
+ ```
213
+
214
+ ### 3d — Ongoing call
215
+
216
+ Mount `<cometchat-ongoing-call>` with the session ID. To detect when the call ends, subscribe to `CometChatCallEvents.ccCallEnded` from the event bus — there is no `(onCallEnded)` output on the component:
217
+
218
+ ```typescript
219
+ // ongoing-call.component.ts
220
+ import { CometChatCallEvents } from "@cometchat/chat-uikit-angular";
221
+
222
+ @Component({
223
+ selector: "app-ongoing-call",
224
+ standalone: true,
225
+ imports: [CometChatOngoingCall],
226
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
227
+ template: `
228
+ <cometchat-ongoing-call
229
+ [sessionID]="sessionId"
230
+ ></cometchat-ongoing-call>
231
+ `,
232
+ })
233
+ export class OngoingCallComponent implements OnInit, OnDestroy {
234
+ sessionId = "";
235
+ private callEndedSub: any;
236
+
237
+ constructor(private route: ActivatedRoute, private router: Router) {}
238
+
239
+ ngOnInit(): void {
240
+ this.sessionId = this.route.snapshot.queryParamMap.get("sessionId") ?? "";
241
+ // Subscribe to call-ended event via the event bus
242
+ this.callEndedSub = (CometChatCallEvents.ccCallEnded as any).subscribe(() => {
243
+ this.router.navigate(["/conversations"]);
244
+ });
245
+ }
246
+
247
+ ngOnDestroy(): void {
248
+ this.callEndedSub?.unsubscribe();
249
+ }
250
+ }
251
+ ```
252
+
253
+ ### 3e — Call logs
254
+
255
+ ```html
256
+ <cometchat-call-logs
257
+ [onItemClick]="openCallDetails"
258
+ ></cometchat-call-logs>
259
+ ```
260
+
261
+ > **`[onItemClick]` is an `@Input()` callback** — use square brackets, not round brackets.
262
+
263
+ ---
264
+
265
+ ## 4. AI Agent (dashboard setup required)
266
+
267
+ ### 4a — Dashboard setup
268
+
269
+ 1. https://app.cometchat.com → your app → AI → Agents
270
+ 2. Create a new agent (name, system prompt, model)
271
+ 3. Assign a UID to the agent (e.g. `ai-support-agent`)
272
+
273
+ Once the agent exists, users can message it like any other user.
274
+
275
+ ### 4b — Chatting with the AI agent
276
+
277
+ The Angular v4 UIKit does **not** ship a dedicated AI assistant component (`<cometchat-ai-assistant-chat-history>` is React v6 only). To chat with an AI agent, use the standard message components targeted at the agent's UID:
278
+
279
+ ```typescript
280
+ // Fetch the AI agent as a CometChat.User
281
+ CometChat.getUser("ai-support-agent").then((agentUser) => {
282
+ this.aiAgent = agentUser;
283
+ });
284
+ ```
285
+
286
+ ```html
287
+ <!-- Standard message view pointed at the AI agent UID -->
288
+ <cometchat-message-header [user]="aiAgent"></cometchat-message-header>
289
+ <cometchat-message-list [user]="aiAgent"></cometchat-message-list>
290
+ <cometchat-message-composer [user]="aiAgent"></cometchat-message-composer>
291
+ ```
292
+
293
+ Smart Replies, Conversation Starter, and Conversation Summary AI features surface automatically in the composer and message list once enabled in the dashboard — no extra component needed.
294
+
295
+ ---
296
+
297
+ ## 5b. Deep patterns for three most-requested features
298
+
299
+ ### Calls — custom call listener
300
+
301
+ After installing `@cometchat/calls-sdk-javascript`, call buttons auto-appear. For custom call state handling:
302
+
303
+ ```typescript
304
+ // In AppComponent — register once at the root
305
+ CometChat.addCallListener(
306
+ "APP_CALL_LISTENER",
307
+ new CometChat.CallListener({
308
+ onIncomingCallReceived: (call: CometChat.Call) => { this.incomingCall = call; },
309
+ onOutgoingCallAccepted: (call: CometChat.Call) => {
310
+ this.outgoingCall = null;
311
+ this.ongoingSessionId = call.getSessionId();
312
+ },
313
+ onOutgoingCallRejected: () => { this.outgoingCall = null; },
314
+ onIncomingCallCancelled: () => { this.incomingCall = null; },
315
+ onCallEndedMessageReceived: () => {
316
+ this.incomingCall = null;
317
+ this.outgoingCall = null;
318
+ this.ongoingSessionId = null;
319
+ },
320
+ })
321
+ );
322
+ ```
323
+
324
+ ### Smart replies — reading extension metadata
325
+
326
+ After enabling Smart Replies in the dashboard, the UI Kit auto-renders chips above the composer. For a custom UI, read the metadata from the incoming message:
327
+
328
+ ```typescript
329
+ // In a message event subscription or custom message template:
330
+ const metadata = message.getMetadata() as Record<string, any>;
331
+ const smartReply = metadata?.['@injected']?.['extensions']?.['smart-reply'];
332
+
333
+ if (smartReply) {
334
+ const replies = [
335
+ smartReply.reply_positive,
336
+ smartReply.reply_neutral,
337
+ smartReply.reply_negative,
338
+ ].filter(Boolean);
339
+ // Render reply chips
340
+ }
341
+ ```
342
+
343
+ ### Presence — live online/offline status in custom UI
344
+
345
+ Presence indicators are built into `<cometchat-conversations>`, `<cometchat-users>`, and `<cometchat-group-members>` automatically. For custom UI that needs live status:
346
+
347
+ ```typescript
348
+ import { Component, OnInit, OnDestroy, Input } from "@angular/core";
349
+ import { CometChat } from "@cometchat/chat-sdk-javascript";
350
+
351
+ @Component({
352
+ selector: "app-user-status",
353
+ template: `<span [style.color]="isOnline ? '#09C26F' : '#a1a1a1'">
354
+ {{ isOnline ? 'Online' : 'Offline' }}
355
+ </span>`,
356
+ })
357
+ export class UserStatusComponent implements OnInit, OnDestroy {
358
+ @Input() uid!: string;
359
+ isOnline = false;
360
+ private readonly LISTENER_ID = `presence-${Date.now()}`;
361
+
362
+ ngOnInit(): void {
363
+ // Fetch initial state
364
+ CometChat.getUser(this.uid).then((u) => {
365
+ this.isOnline = u.getStatus() === "online";
366
+ });
367
+
368
+ // Subscribe to live changes
369
+ CometChat.addUserListener(
370
+ this.LISTENER_ID,
371
+ new CometChat.UserListener({
372
+ onUserOnline: (user: CometChat.User) => {
373
+ if (user.getUid() === this.uid) this.isOnline = true;
374
+ },
375
+ onUserOffline: (user: CometChat.User) => {
376
+ if (user.getUid() === this.uid) this.isOnline = false;
377
+ },
378
+ })
379
+ );
380
+ }
381
+
382
+ ngOnDestroy(): void {
383
+ CometChat.removeUserListener(this.LISTENER_ID);
384
+ }
385
+ }
386
+ ```
387
+
388
+ ---
389
+
390
+ The following work from day 1 without any feature-enabling step:
391
+
392
+ - **Instant messaging** (text, with real-time delivery)
393
+ - **Media sharing** (images, video, audio, files)
394
+ - **Read receipts** (single tick = sent, double tick = delivered, blue = read)
395
+ - **Typing indicators**
396
+ - **@mentions** (requires `CometChatMentionsFormatter` in `[textFormatters]`)
397
+ - **Reactions** (click any message to add emoji reaction)
398
+ - **Replies** (click → Reply)
399
+ - **Edit / delete** own messages
400
+ - **Message info** — sender sees delivery + read timestamps per-recipient
401
+ - **Voice messages** (record + send from composer)
402
+ - **Search** (`[hideSearch]="false"` on `<cometchat-conversations>`, `<cometchat-users>`, `<cometchat-groups>`)
403
+ - **Group management** (create via `<cometchat-create-group>`, add members, leave, transfer ownership)
404
+
405
+ ---
406
+
407
+ ## 6. Finding a feature's category quickly
408
+
409
+ When a user asks for a feature, use this flow:
410
+
411
+ 1. **Is it in the core-features list (§ 5)?** → Already works. Confirm no `[hide*]` input is turning it off.
412
+ 2. **Is it voice / video / call history?** → Calls (§ 3). Package install.
413
+ 3. **Is it polls, stickers, message translation, link preview, collaborative doc / whiteboard, thumbnails?** → Extension (§ 2). Run `cometchat apply-feature <id> --app-id <X>`.
414
+ 3a. **Is it smart replies, conversation summary, or conversation starter?** → AI feature (§ 2). Run `cometchat apply-feature <id> --app-id <X> --openai-key sk-...`.
415
+ 3b. **Is it Giphy / Stipop / Tenor / Chatwoot / Intercom / Disappearing Messages / Message Shortcuts?** → Dashboard-only (§ 2). User must enter third-party config in https://app.cometchat.com → Extensions.
416
+ 4. **Is it AI agent?** → § 4.
417
+ 5. **Is it custom text formatting, custom message templates, custom slot views, custom theme?** → This is **customization**, not a feature. Route to `cometchat-angular-customization` or `cometchat-angular-theming`.
418
+ 6. **Not on this list?** → Check `docs/ui-kit/angular/guide-overview` + the kit's exports. If still nothing, tell the user the feature isn't in the UI Kit; they may need to build it with the SDK directly.
419
+
420
+ ---
421
+
422
+ ## 7. Anti-patterns
423
+
424
+ 1. **Do NOT speculatively install the calls SDK.** Install only after the user says they want calls.
425
+
426
+ 2. **Do NOT enable extensions your app doesn't use.** Each enabled extension adds data-fetching overhead.
427
+
428
+ 3. **Do NOT wire the call listener per-component.** It should be once, at the app root (`AppComponent`). Per-component registration causes missed incoming calls when the user navigates away.
429
+
430
+ 4. **Do NOT forget to unsubscribe / remove listeners in `ngOnDestroy`.** Angular components are destroyed on navigation — leaked listeners cause duplicate event handling.
431
+
432
+ 5. **Do NOT reference AI tools or streaming APIs from memory.** These APIs change across UIKit minor versions. Query the docs MCP before generating code.
433
+
434
+ ---
435
+
436
+ ## Skill routing reference
437
+
438
+ | Skill | When to route |
439
+ |---|---|
440
+ | `cometchat-angular-core` | Init / login / module setup |
441
+ | `cometchat-angular-components` | Component prop reference (for `<cometchat-call-buttons>`, `<cometchat-ongoing-call>`, etc.) |
442
+ | `cometchat-angular-placement` | Where the ongoing-call route, call-logs tab, AI chat route go |
443
+ | `cometchat-angular-features` | This skill — which features exist + how to enable each |
444
+ | `cometchat-angular-theming` | Theming call buttons, reaction colors, extension UI colors |
445
+ | `cometchat-angular-customization` | Custom text formatters, custom message templates, event bus |
446
+ | `cometchat-angular-production` | Production auth tokens (prerequisite for AI agent in prod) |
447
+ | `cometchat-angular-troubleshooting` | Extension not showing after enabling, call permissions denied |