@cometchat/skills 4.3.0 → 4.4.1
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.
- package/LICENSE +21 -0
- package/bin/install.js +27 -0
- package/package.json +14 -1
- package/skills/cometchat/SKILL.md +233 -69
- package/skills/cometchat/references/asking-questions.md +48 -0
- package/skills/cometchat-a11y/SKILL.md +3 -2
- package/skills/cometchat-android-v5/SKILL.md +2 -1
- package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
- package/skills/cometchat-android-v5-calls/references/README.md +1 -1
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
- package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
- package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
- package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
- package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
- package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
- package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
- package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
- package/skills/cometchat-android-v5-components/SKILL.md +4 -3
- package/skills/cometchat-android-v5-core/SKILL.md +5 -3
- package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
- package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
- package/skills/cometchat-android-v5-features/SKILL.md +5 -4
- package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
- package/skills/cometchat-android-v5-production/SKILL.md +2 -1
- package/skills/cometchat-android-v5-push/SKILL.md +2 -3
- package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
- package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
- package/skills/cometchat-android-v6/SKILL.md +2 -1
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
- package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
- package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
- package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
- package/skills/cometchat-android-v6-core/SKILL.md +208 -28
- package/skills/cometchat-android-v6-events/SKILL.md +4 -1
- package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
- package/skills/cometchat-android-v6-features/SKILL.md +26 -2
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
- package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
- package/skills/cometchat-android-v6-production/SKILL.md +6 -3
- package/skills/cometchat-android-v6-push/SKILL.md +43 -2
- package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
- package/skills/cometchat-angular-calls/SKILL.md +256 -389
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
- package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
- package/skills/cometchat-angular-calls/references/call-session.md +2 -2
- package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
- package/skills/cometchat-angular-calls/references/device-management.md +53 -34
- package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
- package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
- package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
- package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
- package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
- package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
- package/skills/cometchat-angular-components/SKILL.md +149 -620
- package/skills/cometchat-angular-core/SKILL.md +232 -312
- package/skills/cometchat-angular-customization/SKILL.md +415 -223
- package/skills/cometchat-angular-features/SKILL.md +216 -334
- package/skills/cometchat-angular-patterns/SKILL.md +168 -359
- package/skills/cometchat-angular-placement/SKILL.md +189 -560
- package/skills/cometchat-angular-production/SKILL.md +241 -92
- package/skills/cometchat-angular-push/SKILL.md +280 -294
- package/skills/cometchat-angular-testing/SKILL.md +430 -158
- package/skills/cometchat-angular-theming/SKILL.md +190 -265
- package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
- package/skills/cometchat-astro-patterns/SKILL.md +3 -2
- package/skills/cometchat-calls/SKILL.md +25 -19
- package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
- package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
- package/skills/cometchat-calls/references/use-case-support.md +3 -4
- package/skills/cometchat-calls/references/use-case-team.md +23 -12
- package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
- package/skills/cometchat-components/SKILL.md +163 -25
- package/skills/cometchat-core/SKILL.md +258 -20
- package/skills/cometchat-customization/SKILL.md +50 -25
- package/skills/cometchat-features/SKILL.md +314 -35
- package/skills/cometchat-flutter-v5/SKILL.md +10 -4
- package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
- package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
- package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
- package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
- package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6/SKILL.md +17 -16
- package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
- package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
- package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
- package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
- package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
- package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
- package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
- package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
- package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
- package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
- package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
- package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
- package/skills/cometchat-i18n/SKILL.md +140 -79
- package/skills/cometchat-ios/SKILL.md +4 -2
- package/skills/cometchat-ios-calls/SKILL.md +225 -95
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
- package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
- package/skills/cometchat-ios-calls/references/call-session.md +51 -54
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
- package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
- package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
- package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
- package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
- package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
- package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
- package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
- package/skills/cometchat-ios-components/SKILL.md +200 -12
- package/skills/cometchat-ios-core/SKILL.md +173 -45
- package/skills/cometchat-ios-customization/SKILL.md +276 -110
- package/skills/cometchat-ios-features/SKILL.md +64 -36
- package/skills/cometchat-ios-placement/SKILL.md +15 -12
- package/skills/cometchat-ios-production/SKILL.md +12 -4
- package/skills/cometchat-ios-push/SKILL.md +53 -19
- package/skills/cometchat-ios-testing/SKILL.md +14 -9
- package/skills/cometchat-ios-theming/SKILL.md +39 -3
- package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
- package/skills/cometchat-native-bare-patterns/SKILL.md +36 -19
- package/skills/cometchat-native-calls/SKILL.md +29 -17
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
- package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
- package/skills/cometchat-native-calls/references/call-session.md +2 -2
- package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
- package/skills/cometchat-native-calls/references/device-management.md +53 -30
- package/skills/cometchat-native-calls/references/group-calls.md +35 -30
- package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
- package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
- package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
- package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
- package/skills/cometchat-native-calls/references/share-invite.md +7 -5
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
- package/skills/cometchat-native-components/SKILL.md +84 -52
- package/skills/cometchat-native-core/SKILL.md +102 -33
- package/skills/cometchat-native-customization/SKILL.md +150 -28
- package/skills/cometchat-native-expo-patterns/SKILL.md +60 -29
- package/skills/cometchat-native-features/SKILL.md +24 -17
- package/skills/cometchat-native-placement/SKILL.md +19 -10
- package/skills/cometchat-native-production/SKILL.md +9 -3
- package/skills/cometchat-native-push/SKILL.md +2 -1
- package/skills/cometchat-native-testing/SKILL.md +1 -2
- package/skills/cometchat-native-theming/SKILL.md +54 -29
- package/skills/cometchat-native-troubleshooting/SKILL.md +11 -5
- package/skills/cometchat-nextjs-patterns/SKILL.md +22 -8
- package/skills/cometchat-placement/SKILL.md +42 -3
- package/skills/cometchat-production/SKILL.md +12 -5
- package/skills/cometchat-react-calls/SKILL.md +220 -10
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
- package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
- package/skills/cometchat-react-calls/references/call-session.md +1 -1
- package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
- package/skills/cometchat-react-calls/references/device-management.md +55 -51
- package/skills/cometchat-react-calls/references/group-calls.md +18 -23
- package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
- package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
- package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
- package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
- package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
- package/skills/cometchat-react-calls/references/share-invite.md +4 -5
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
- package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
- package/skills/cometchat-react-patterns/SKILL.md +45 -5
- package/skills/cometchat-react-push/SKILL.md +258 -72
- package/skills/cometchat-react-router-patterns/SKILL.md +12 -6
- package/skills/cometchat-react-testing/SKILL.md +14 -5
- package/skills/cometchat-theming/SKILL.md +181 -18
- package/skills/cometchat-troubleshooting/SKILL.md +40 -20
|
@@ -3,13 +3,16 @@ name: cometchat-features
|
|
|
3
3
|
description: Add features (calls, reactions, polls, file sharing, presence, etc.) to an already-integrated CometChat project. Routes to the right sub-flow based on feature type — default (already enabled), extension (API toggle), ai-feature (API toggle + OpenAI key), dashboard-only (third-party config), package-install (calls), or component-swap (rich text).
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Node.js >=18; @cometchat/chat-uikit-react ^6; integration must already be applied"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
10
9
|
tags: "cometchat features extensions calls reactions polls ai-features"
|
|
11
10
|
---
|
|
12
11
|
|
|
12
|
+
> **Ground truth:** the 5-tier feature catalog `packages/registry/v6/features/catalog.json` + the per-platform UI Kit `defaultExtensions[]`. (Official docs linked below.) Verify symbols against the installed package/source before relying on them.
|
|
13
|
+
|
|
14
|
+
> **Scope — this IS the web / React features skill** (`@cometchat/chat-uikit-react`). Web/React intentionally has no separate "react-features" skill: this one is it. Each other family has its own features skill (native / angular / android-v5 / android-v6 / ios / flutter-v6). **Flutter V5 has none — it proxies to `cometchat-flutter-v6-features`** for enablement: feature *enablement* is the SDK/dashboard `apply-feature` path (identical across V5/V6); only the in-UI wiring differs, and V5 is legacy/maintenance-only. The `apply-feature` CLI + the 5-tier taxonomy below apply to all families.
|
|
15
|
+
|
|
13
16
|
> **Companion skills:** `cometchat-core` covers initialization and the
|
|
14
17
|
> provider pattern; `cometchat-customization` is the next step when a
|
|
15
18
|
> feature is enabled but needs visual customization;
|
|
@@ -52,10 +55,31 @@ npx @cometchat/skills-cli info --json
|
|
|
52
55
|
If `integrated` is `false`, **stop** and tell the user to run `/cometchat`
|
|
53
56
|
first to create the integration.
|
|
54
57
|
|
|
55
|
-
## 3.
|
|
58
|
+
## 3. The 5 feature categories (customer-facing) — and what work each needs
|
|
59
|
+
|
|
60
|
+
CometChat's canonical "Feature Availability" model sorts every feature into **5 categories by the work needed** (the catalog encodes this per-feature as `tier` + the operative columns `code` / `dashboard_settings` / `builder`; run `cometchat features info <id> --json`).
|
|
61
|
+
|
|
62
|
+
> **Canonical public decision-reference (source of truth):** [Features & Extensions Guide](https://www.cometchat.com/docs/fundamentals/features-and-extensions-guide) on the public docs. It is the authoritative, always-current matrix of *which integration method supports each feature* (UI Kit / UI Kit Builder / Widget Builder / SDK), *what dashboard setup it needs*, and *whether code is required*. **When the local `catalog.json` and this page disagree, the docs page wins** — the catalog is a build-time snapshot derived from the same model and can lag a release. For any "can the builder do X? / is feature Y code-or-dashboard?" decision, consult this page (WebFetch it, or query the docs MCP) rather than answering from memory or a stale snapshot.
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
| Tier | Category | Work needed | Example |
|
|
67
|
+
|---|---|---|---|
|
|
68
|
+
| **1** | Core Messaging (Zero Setup) | Nothing — renders out of the box | Typing Indicators |
|
|
69
|
+
| **2** | Builder-Enabled (Config + UI Toggle) | Enable via Dashboard API; toggle/place in the UI Kit Builder | Polls |
|
|
70
|
+
| **3** | Config-Only (Dashboard-Driven) | Enable via Dashboard API; works automatically | Link Preview |
|
|
71
|
+
| **4** | Config + Settings (Smart) | Dashboard API + extra settings (API keys, thresholds) — no code | Smart Replies |
|
|
72
|
+
| **5** | SDK-Integrated (Config + Code) | Dashboard API + **custom client code** | Bitly |
|
|
73
|
+
|
|
74
|
+
Tiers 1–4 need **no client code** (`code: "none"`). **Tier 5 needs code — and the implementation already lives in the docs.** When a feature's `code` is `custom-code` or `steps-in-docs` (i.e. `auto_wired_in_uikit: false`), the flow is: flip the dashboard toggle (`apply-feature <id>`), then **fetch the reference implementation from the docs (`docs_topic`, via the docs MCP) and adapt it — do NOT hand-roll.** A few Core features carry `code: "stitch-components"` (e.g. Threaded Conversations, Advanced Search): no extension, but you **compose existing kit components** — the kit sample apps show the wiring (see [[uikit-local-clones-canonical-source]]). The 14 code-needed extensions: bitly, message-shortcuts, pin-message, rich-media-preview, save-message, tinyurl, voice-transcription, giphy, reminders, stipop, tenor, disappearing-messages, chatwoot, intercom.
|
|
75
|
+
|
|
76
|
+
> T2 vs T3 is a Builder-surface nuance (does the Builder expose a placement/toggle for it). Operationally both are "enable via Dashboard, no code" — the `builder: "toggle"` flag marks the ones the Builder surfaces.
|
|
56
77
|
|
|
57
|
-
|
|
58
|
-
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 3b. Enablement mechanism (how the CLI flips each on)
|
|
81
|
+
|
|
82
|
+
Independently of the 5 customer-facing tiers above, the catalog tags each feature with an **enablement mechanism** — what the CLI's `apply-feature` actually does:
|
|
59
83
|
|
|
60
84
|
- **default (compiled-in):** Shipped inside the UI Kit component bundle
|
|
61
85
|
unconditionally. CometChat builds reactions, typing indicators,
|
|
@@ -67,7 +91,8 @@ needed to enable each one:
|
|
|
67
91
|
The CLI's `apply-feature` command flips the toggle via the same REST
|
|
68
92
|
API the dashboard UI uses (`POST /apps/{id}/extensions`), so no
|
|
69
93
|
browser visit required. Once enabled, the UI Kit renders the matching
|
|
70
|
-
UI automatically
|
|
94
|
+
UI automatically **only for the auto-wired subset** (`auto_wired_in_uikit: true`,
|
|
95
|
+
`code: "none"`); the rest (tier 5) need client code from the docs. Examples: polls, link-preview,
|
|
71
96
|
message-translation, stickers.
|
|
72
97
|
|
|
73
98
|
- **ai-feature (backend AI toggle + OpenAI key):** Same API path as
|
|
@@ -140,7 +165,13 @@ For native cohorts (iOS / Android / Flutter / Angular) where there's no
|
|
|
140
165
|
cometchat apply-feature <id> --app-id <your-app-id>
|
|
141
166
|
```
|
|
142
167
|
|
|
143
|
-
Once enabled, the UI Kit auto-integrates them. **No code changes needed.**
|
|
168
|
+
Once enabled, the UI Kit auto-integrates them. **No code changes needed — for the auto-wired subset.**
|
|
169
|
+
|
|
170
|
+
> ⚠️ **The "no code needed" pitch only holds for ~7 of 24 dashboard-toggle features (ENG-35721).** The dashboard exposes 24 extensions; only the ones marked `auto_wired_in_uikit: true` in the CLI's catalog (~7 — Link Preview, Polls, Stickers, Message Translation, Smart Replies, Conversation Starter, and a handful more) render automatically via the kit's bubbles + composer. The other ~17 (Bitly, TinyURL, Voice Transcription, Reminders, Save Message, Pin Message, etc.) require **either a kit prop opt-in OR a small component-side handler** — `apply-feature <id>` flips the dashboard toggle but does NOT wire client-side rendering for those. **Before promising "no code needed" to the customer**, run `cometchat features info <id> --json` and check the `auto_wired_in_uikit` field; if `false`, set expectations honestly and emit the wiring code.
|
|
171
|
+
|
|
172
|
+
> ⚠️ **`features enable` has TWO unstated prereqs (ENG-35721):**
|
|
173
|
+
> 1. **`auth login` must have completed** — the toggle is gated on the dashboard bearer token. The CLI's "no app" error says nothing about login; running `cometchat features enable <id>` cold (after only `provision setup`) fails with a misleading message. Run `cometchat auth status --json` first; if `"logged-out"`, run `cometchat auth login` before any `features enable`.
|
|
174
|
+
> 2. **Either `.cometchat/config.json` OR `--app-id <id>`** — the toggle needs an app context. If the user pasted credentials manually (the dispatcher's Step 2d path) they may NOT have a `.cometchat/config.json` yet. **Manual `.env` users:** run `cometchat config save --app-id <id> --region <region> --json` to bridge into `.cometchat/config.json` before `apply-feature`, OR pass `--app-id` on every `apply-feature` call.
|
|
144
175
|
|
|
145
176
|
> **Note:** Conversation and Advanced Search has its own toggle on the
|
|
146
177
|
> Features page. It is on by default but can be disabled. If a user
|
|
@@ -152,21 +183,23 @@ Media Preview, Save Message, Thumbnail Generation, TinyURL, Voice
|
|
|
152
183
|
Transcription
|
|
153
184
|
|
|
154
185
|
**Extensions — User Engagement:**
|
|
155
|
-
|
|
186
|
+
Giphy, Message Translation, Polls, Reminders,
|
|
156
187
|
Stickers, Stipop, Tenor
|
|
157
188
|
|
|
189
|
+
> ⚠️ **Broadcast was removed (ENG-35699).** Earlier versions of this skill listed "Broadcast" here, but the CLI's 40-feature catalog has no `broadcast` or `broadcast-message` id — `cometchat-skills-cli features info broadcast` returns "not found." Broadcast as a *use case* is achievable via standard CometChat extensions (one-to-many group messages with `subscribePresenceForAllUsers`) or via Custom Messages — but there is no "Broadcast" extension toggle in the dashboard today. If a customer asks for broadcast functionality, route them at custom messages + a server-side fan-out webhook, not a feature toggle.
|
|
190
|
+
|
|
158
191
|
**Extensions — Collaboration:**
|
|
159
192
|
Collaborative Document, Collaborative Whiteboard
|
|
160
193
|
|
|
161
194
|
**Extensions — Security:**
|
|
162
195
|
Disappearing Messages, E2E Encryption (Enterprise plan only)
|
|
163
196
|
|
|
164
|
-
**Extensions — Moderation
|
|
197
|
+
**Extensions — Moderation (LEGACY — prefer Rules Management, see §"Moderation" below):**
|
|
165
198
|
Data Masking, Image Moderation, Profanity Filter, Sentiment Analysis,
|
|
166
199
|
XSS Filter, Human Moderation, Report User, Slow Mode,
|
|
167
|
-
Virus/Malware Scanner
|
|
200
|
+
Virus/Malware Scanner. ⚠️ Deprecated; don't run alongside moderation Rules (double-processes every message).
|
|
168
201
|
|
|
169
|
-
**
|
|
202
|
+
**Notifications extensions** (Chat & Messaging → Features):
|
|
170
203
|
Email Notification, Push Notification, SMS Notification
|
|
171
204
|
|
|
172
205
|
**Extensions — Customer Support:**
|
|
@@ -202,21 +235,28 @@ CLI cannot automate these:
|
|
|
202
235
|
|
|
203
236
|
Manual flow for these:
|
|
204
237
|
1. https://app.cometchat.com → select your app
|
|
205
|
-
2. Sidebar →
|
|
206
|
-
Disappearing Messages)
|
|
238
|
+
2. Sidebar → Chat & Messaging → Features
|
|
207
239
|
3. Find the extension, enter the third-party config, toggle ON
|
|
208
240
|
|
|
209
|
-
### Moderation
|
|
241
|
+
### Moderation — use Rules Management (NOT the legacy extensions)
|
|
210
242
|
|
|
211
|
-
|
|
212
|
-
|
|
243
|
+
**The canonical moderation system is Rules Management**, not the old per-extension
|
|
244
|
+
toggles. Configure rules once in the Dashboard (**Moderation → Settings → Rules**,
|
|
245
|
+
or the `/moderation/rules` REST API — also `/moderation/{keywords,reasons,
|
|
246
|
+
blocked-messages,flagged-messages,reviewed-messages}`) and they auto-apply to every
|
|
247
|
+
message with **no client code** (the UI Kit + SDK enforce them seamlessly). Docs:
|
|
248
|
+
`moderation/overview` + `moderation/rules-management`.
|
|
213
249
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
250
|
+
> ⚠️ **Do NOT run legacy moderation extensions AND Rules on the same app.** The
|
|
251
|
+
> legacy extensions (Data Masking, Image Moderation, Profanity Filter, Sentiment
|
|
252
|
+
> Analysis, XSS Filter, Slow Mode, Virus/Malware Scanner) are **deprecated**. If
|
|
253
|
+
> both a legacy extension and a Rule are active, **every message is processed
|
|
254
|
+
> twice** → delays + perf issues. Disable the legacy extensions (Dashboard →
|
|
255
|
+
> Extensions) before creating Rules. `apply-feature <legacy-id>` still works but
|
|
256
|
+
> emits this same warning — prefer Rules.
|
|
218
257
|
|
|
219
|
-
|
|
258
|
+
- **Notifications** (separate, unaffected): Email, Push, SMS — Sidebar →
|
|
259
|
+
**Extensions** → configure + enable.
|
|
220
260
|
|
|
221
261
|
After enabling any feature, run `cometchat verify` to ensure the
|
|
222
262
|
existing integration still passes. No code changes are needed — the
|
|
@@ -236,7 +276,7 @@ CometChatConversations, etc.
|
|
|
236
276
|
For these, the user opting in IS consent — run the install directly:
|
|
237
277
|
|
|
238
278
|
```bash
|
|
239
|
-
npm install @cometchat/calls-sdk-javascript
|
|
279
|
+
npm install @cometchat/calls-sdk-javascript@^5
|
|
240
280
|
npx @cometchat/skills-cli verify --json
|
|
241
281
|
```
|
|
242
282
|
|
|
@@ -244,6 +284,218 @@ The UI Kit's `initiateAfterLogin()` auto-calls `enableCalling()` after the
|
|
|
244
284
|
package is installed. No manual wiring needed for default call buttons in
|
|
245
285
|
CometChatMessageHeader. Restart the dev server.
|
|
246
286
|
|
|
287
|
+
### Type 5 — Custom message types (APPEND, never REPLACE — ENG-35706)
|
|
288
|
+
|
|
289
|
+
When a customer wants to send a new message type (location, product card, custom event), the V6 React kit ships a templates API that is **dangerously easy to misuse.** Two testers hit the same trap: they added one custom template and watched ALL existing bubbles (text, image, audio, video, file) disappear AND the composer's entire attachment menu (Camera/Image/Video/File/Whiteboard/Document) get replaced by their one new attachment.
|
|
290
|
+
|
|
291
|
+
**Cause:** `<CometChatMessageList templates={[locationTemplate]} />` and `<CometChatMessageComposer attachmentOptions={[locationOption]} />` **REPLACE** the kit's built-in templates / options rather than appending to them.
|
|
292
|
+
|
|
293
|
+
**Correct pattern — always merge with the kit's defaults:**
|
|
294
|
+
|
|
295
|
+
```tsx
|
|
296
|
+
import {
|
|
297
|
+
CometChatMessageList,
|
|
298
|
+
CometChatMessageComposer,
|
|
299
|
+
CometChatMessageTemplate, // the kit's template class — verified export (src/index.ts:79)
|
|
300
|
+
CometChatMessageComposerAction, // attachment-menu action class
|
|
301
|
+
CometChatUIKit, // exposes getDataSource()
|
|
302
|
+
CometChatUIKitConstants, // MessageTypes / MessageCategory enums
|
|
303
|
+
} from "@cometchat/chat-uikit-react";
|
|
304
|
+
|
|
305
|
+
// 1. Build your custom template with the kit's CometChatMessageTemplate class.
|
|
306
|
+
// ⚠️ It is `new CometChatMessageTemplate(...)` (UI Kit) — NOT
|
|
307
|
+
// `new CometChat.MessageTemplate(...)`. The Chat SDK has no MessageTemplate
|
|
308
|
+
// export; that form does not exist and will not compile.
|
|
309
|
+
const locationTemplate = new CometChatMessageTemplate({
|
|
310
|
+
type: "location",
|
|
311
|
+
category: CometChatUIKitConstants.MessageCategory.custom, // "custom"
|
|
312
|
+
contentView: (message, alignment) => <LocationBubble message={message} />,
|
|
313
|
+
// headerView / footerView / bottomView / bubbleView / statusInfoView / options
|
|
314
|
+
// all inherit the kit's defaults when omitted.
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
// 2. Merge with the kit's defaults — DO NOT pass only your template.
|
|
318
|
+
// CometChatUIKit.getDataSource() is the public accessor; it returns the same
|
|
319
|
+
// DataSource as ChatConfigurator.getDataSource() (the latter is internal).
|
|
320
|
+
const defaultTemplates = CometChatUIKit.getDataSource().getAllMessageTemplates();
|
|
321
|
+
const mergedTemplates = [...defaultTemplates, locationTemplate];
|
|
322
|
+
|
|
323
|
+
<CometChatMessageList templates={mergedTemplates} />
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
**Same rule for attachment options.** `getAttachmentOptions` takes a `ComposerId` (`{ user?, group?, parentMessageId? }`) **AND a required second argument** (`additionalConfigurations`), then append your action:
|
|
327
|
+
|
|
328
|
+
```tsx
|
|
329
|
+
// ComposerId = { parentMessageId, user, group } — all three keys, values nullable.
|
|
330
|
+
const composerId = {
|
|
331
|
+
parentMessageId: null,
|
|
332
|
+
user: selectedUser?.getUid() ?? null,
|
|
333
|
+
group: selectedGroup?.getGuid() ?? null,
|
|
334
|
+
};
|
|
335
|
+
// ⚠️ MUST pass a defined object as the 2nd arg. The extension data sources
|
|
336
|
+
// (Polls, Collaborative Document/Whiteboard) read `messageToReplyRef` off it
|
|
337
|
+
// WITHOUT optional chaining — passing nothing/undefined throws at runtime:
|
|
338
|
+
// "Cannot read properties of undefined (reading 'messageToReplyRef')"
|
|
339
|
+
// (Verified against the official v6 sample app's live-location feature.)
|
|
340
|
+
const additionalConfigurations = { messageToReplyRef: { current: null } };
|
|
341
|
+
const defaultAttachments = CometChatUIKit.getDataSource().getAttachmentOptions(
|
|
342
|
+
composerId,
|
|
343
|
+
additionalConfigurations,
|
|
344
|
+
);
|
|
345
|
+
const mergedAttachments = [...defaultAttachments, new CometChatMessageComposerAction({
|
|
346
|
+
id: "send-location",
|
|
347
|
+
title: "Location",
|
|
348
|
+
iconURL: "/icons/location.svg",
|
|
349
|
+
onClick: () => { /* open location picker */ },
|
|
350
|
+
})];
|
|
351
|
+
|
|
352
|
+
<CometChatMessageComposer attachmentOptions={mergedAttachments} />
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
**Also**: when sending the custom message, set both `receiverType` AND `type` correctly. Two testers hit `"Cannot determine message recipient"` because they passed a partial `CustomMessage` constructor. Use the full form:
|
|
356
|
+
|
|
357
|
+
```tsx
|
|
358
|
+
const msg = new CometChat.CustomMessage(
|
|
359
|
+
receiverID, // who to send to (required)
|
|
360
|
+
receiverType, // CometChat.RECEIVER_TYPE.USER or .GROUP (required — this is the field testers missed)
|
|
361
|
+
"location", // custom type identifier
|
|
362
|
+
{ lat, lng, label } // your payload
|
|
363
|
+
);
|
|
364
|
+
CometChat.sendCustomMessage(msg);
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
> **Custom type sends + renders live, but vanishes on reload?** The custom message
|
|
368
|
+
> appears immediately (the `ccMessageSent` event), but to **fetch it from history**
|
|
369
|
+
> you must include your custom category + type in the list's `messagesRequestBuilder`.
|
|
370
|
+
> Extend the kit's defaults (don't hand-list them) — append to
|
|
371
|
+
> `getAllMessageCategories()` + `getAllMessageTypes()`:
|
|
372
|
+
>
|
|
373
|
+
> ```tsx
|
|
374
|
+
> const categories = CometChatUIKit.getDataSource().getAllMessageCategories();
|
|
375
|
+
> if (!categories.includes(CometChatUIKitConstants.MessageCategory.custom))
|
|
376
|
+
> categories.push(CometChatUIKitConstants.MessageCategory.custom);
|
|
377
|
+
> const types = CometChatUIKit.getDataSource().getAllMessageTypes();
|
|
378
|
+
> if (!types.includes("location")) types.push("location");
|
|
379
|
+
>
|
|
380
|
+
> const messagesRequestBuilder = new CometChat.MessagesRequestBuilder()
|
|
381
|
+
> .setCategories(categories).setTypes(types).hideReplies(true).setLimit(30);
|
|
382
|
+
>
|
|
383
|
+
> <CometChatMessageList templates={mergedTemplates} messagesRequestBuilder={messagesRequestBuilder} />
|
|
384
|
+
> ```
|
|
385
|
+
> (Verified against the official v6 sample app's live-location feature.) Tip: on the
|
|
386
|
+
> `CustomMessage`, call `setConversationText("Live Location")` so it reads nicely as
|
|
387
|
+
> the conversation-list preview, and `setSender(loggedInUser)` for optimistic render.
|
|
388
|
+
|
|
389
|
+
#### Override an existing message type's bubble (text / image / etc.)
|
|
390
|
+
|
|
391
|
+
Same templates API — fetch all, replace `contentView` (or `bubbleView` for the whole bubble) on the matching template, pass the array. There is NO separate "override" call; you reuse `getAllMessageTemplates()`:
|
|
392
|
+
|
|
393
|
+
```tsx
|
|
394
|
+
const templates = CometChatUIKit.getDataSource().getAllMessageTemplates();
|
|
395
|
+
const withCustomTextBubble = templates.map((t) => {
|
|
396
|
+
if (
|
|
397
|
+
t.type === CometChatUIKitConstants.MessageTypes.text &&
|
|
398
|
+
t.category === CometChatUIKitConstants.MessageCategory.message
|
|
399
|
+
) {
|
|
400
|
+
t.contentView = (message, alignment) => <MyTextBubble message={message} />;
|
|
401
|
+
// or t.bubbleView = (...) => <... /> to replace the ENTIRE bubble (header+content+footer)
|
|
402
|
+
}
|
|
403
|
+
return t;
|
|
404
|
+
});
|
|
405
|
+
|
|
406
|
+
<CometChatMessageList templates={withCustomTextBubble} />
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
(`CometChatUIKit.getDataSource().getMessageTemplate(type, category)` returns a single template if you'd rather fetch just one — but you still pass the full array to the `templates` prop.)
|
|
410
|
+
|
|
411
|
+
#### Add a custom message option (Forward-style long-press action)
|
|
412
|
+
|
|
413
|
+
Message options live on each template's `options` function. Override it and **merge with the kit defaults** (same REPLACE-vs-APPEND rule) via `getMessageOptions`. Custom actions use `CometChatActionsIcon` (NOT `CometChatMessageComposerAction` — that's composer-only):
|
|
414
|
+
|
|
415
|
+
```tsx
|
|
416
|
+
import { CometChatActionsIcon } from "@cometchat/chat-uikit-react";
|
|
417
|
+
|
|
418
|
+
const templates = CometChatUIKit.getDataSource().getAllMessageTemplates();
|
|
419
|
+
const withForward = templates.map((t) => {
|
|
420
|
+
if (t.type === CometChatUIKitConstants.MessageTypes.text) {
|
|
421
|
+
t.options = (loggedInUser, message, group) => {
|
|
422
|
+
// getMessageOptions(loggedInUser, messageObject, group?, additionalParams?)
|
|
423
|
+
const options = CometChatUIKit.getDataSource().getMessageOptions(loggedInUser, message, group);
|
|
424
|
+
options.push(
|
|
425
|
+
new CometChatActionsIcon({
|
|
426
|
+
id: "forward",
|
|
427
|
+
title: "Forward",
|
|
428
|
+
iconURL: "/icons/forward.svg",
|
|
429
|
+
onClick: (id) => { /* open your forward-to picker → CometChat.sendMessage(...) */ },
|
|
430
|
+
})
|
|
431
|
+
);
|
|
432
|
+
return options;
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
return t;
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
<CometChatMessageList templates={withForward} />
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
"Forward" is not a built-in kit option, so it's added as a custom `CometChatActionsIcon`. The built-ins (reply, edit, delete, react, …) come from `getMessageOptions` — keep them by merging, don't return only your action.
|
|
442
|
+
|
|
443
|
+
> ⚠️ **Kit-side limitation (ENG-35706):** custom message send sometimes **replaces** an existing message in the list in real-time (UI-side overwrite, not server-side). No client workaround today; file a kit ticket if you observe this and document for the customer.
|
|
444
|
+
|
|
445
|
+
#### Text formatters (inline text styling — mentions, URLs, custom @/#/! tokens)
|
|
446
|
+
|
|
447
|
+
Text formatters transform message text inline. The kit ships `CometChatMentionsFormatter`, `CometChatUrlsFormatter`, `CometChatMarkdownFormatter` (all subclasses of the base `CometChatTextFormatter`). **Same APPEND-not-REPLACE rule** as templates/options: passing a bare `textFormatters={[...]}` array drops the built-ins — start from `getAllTextFormatters({})` and append. (Pattern verified against the kit sample app `sample-app/src/components/CometChatMessages/CometChatMessages.tsx`.)
|
|
448
|
+
|
|
449
|
+
```tsx
|
|
450
|
+
import {
|
|
451
|
+
CometChatUIKit,
|
|
452
|
+
CometChatMessageList,
|
|
453
|
+
CometChatTextFormatter,
|
|
454
|
+
} from "@cometchat/chat-uikit-react";
|
|
455
|
+
|
|
456
|
+
// getAllTextFormatters({}) returns the kit defaults (mentions, URLs, …).
|
|
457
|
+
// START here and append — don't hand the component a bare array.
|
|
458
|
+
const formatters: CometChatTextFormatter[] =
|
|
459
|
+
CometChatUIKit.getDataSource().getAllTextFormatters({});
|
|
460
|
+
|
|
461
|
+
// Append your own: subclass CometChatTextFormatter (override its regex + view
|
|
462
|
+
// hooks) and push it. See the per-pattern guides below for full subclasses.
|
|
463
|
+
// formatters.push(new MyHashtagFormatter());
|
|
464
|
+
|
|
465
|
+
<CometChatMessageList textFormatters={formatters} />;
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
> **Guides (canonical subclass examples):** custom-text-formatter-guide, mentions-formatter-guide, url-formatter-guide, shortcut-formatter-guide — all under `ui-kit/react/` (query the docs MCP, or `documentation/docs/ui-kit/react/*-formatter-guide.mdx` locally). Each shows a complete `CometChatTextFormatter` subclass (regex + `getFormattedText` + a custom view).
|
|
469
|
+
|
|
470
|
+
### Type 6 — Dashboard-AI mode (UI-side side-effects — ENG-35706)
|
|
471
|
+
|
|
472
|
+
When the customer enables the AI Agent on the dashboard (e.g. `aiAssistant: true` for an app), the SAME `<CometChatMessageList>` renders with thread reply buttons + call buttons that don't make sense in an AI-only conversation surface.
|
|
473
|
+
|
|
474
|
+
**Detect AI mode and branch the layout:**
|
|
475
|
+
|
|
476
|
+
```tsx
|
|
477
|
+
// Read app's AI config from the dashboard via the CLI
|
|
478
|
+
// npx @cometchat/skills-cli features info ai-assistant --json
|
|
479
|
+
// → { enabled: true, models: [...], ... }
|
|
480
|
+
|
|
481
|
+
const isAiMode = aiAssistantConfig?.enabled === true;
|
|
482
|
+
|
|
483
|
+
<CometChatMessageList
|
|
484
|
+
user={selectedUser}
|
|
485
|
+
group={selectedGroup}
|
|
486
|
+
// AI conversations shouldn't show "Reply in Thread" / "Message Privately" / call buttons
|
|
487
|
+
hideReplyInThreadOption={true}
|
|
488
|
+
// (call buttons live on CometChatMessageHeader, NOT MessageList — hide them there)
|
|
489
|
+
/>
|
|
490
|
+
<CometChatMessageHeader
|
|
491
|
+
user={selectedUser}
|
|
492
|
+
hideVideoCallButton={isAiMode}
|
|
493
|
+
hideVoiceCallButton={isAiMode}
|
|
494
|
+
/>
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
The kit doesn't auto-detect dashboard AI mode and adjust its layout — that's a kit-side gap (filed as part of ENG-35706). Until the kit ships a built-in `aiMode` prop, the skill must read the dashboard flag via `features info ai-assistant --json` (see ENG-35716 dispatcher rule) and gate the relevant buttons.
|
|
498
|
+
|
|
247
499
|
### Type 4 — Component-swap features (drop-in variant)
|
|
248
500
|
|
|
249
501
|
Some features require swapping one component for a variant that has
|
|
@@ -299,7 +551,9 @@ export function CustomCallUI({ targetUser }: { targetUser: CometChat.User }) {
|
|
|
299
551
|
new CometChat.CallListener({
|
|
300
552
|
onOutgoingCallAccepted: (call: CometChat.Call) => setOngoingCall(call),
|
|
301
553
|
onIncomingCallCancelled: () => setOngoingCall(undefined),
|
|
302
|
-
|
|
554
|
+
// CallListener uses onCallEndedMessageReceived (NOT onCallEnded — that's
|
|
555
|
+
// an OngoingCallListener callback, passed to CallSettingsBuilder).
|
|
556
|
+
onCallEndedMessageReceived: () => setOngoingCall(undefined),
|
|
303
557
|
}),
|
|
304
558
|
);
|
|
305
559
|
return () => CometChat.removeCallListener(listenerId);
|
|
@@ -315,11 +569,24 @@ export function CustomCallUI({ targetUser }: { targetUser: CometChat.User }) {
|
|
|
315
569
|
}
|
|
316
570
|
```
|
|
317
571
|
|
|
318
|
-
**Common gotchas:**
|
|
572
|
+
**Common gotchas — UI Kit path:**
|
|
319
573
|
- Calls require a logged-in CometChat user on *both* sides. Test from two browsers (or incognito) logged in as different UIDs.
|
|
320
574
|
- `CometChatIncomingCall` must be mounted globally (e.g. in your provider or layout) so incoming calls ring on every page.
|
|
321
575
|
- Group calls use `CometChat.Group` instead of `CometChat.User` on `CometChatCallButtons`.
|
|
322
576
|
|
|
577
|
+
**Common gotchas — SDK-only path (no UI Kit components, ENG-35707 Birendra follow-up):**
|
|
578
|
+
|
|
579
|
+
When the integrator opts out of `<CometChatCallButtons>` / `<CometChatIncomingCall>` / `<CometChatOngoingCall>` and builds the call surface directly on the Calls SDK, the UI-Kit gotchas above don't apply but a different set kicks in:
|
|
580
|
+
|
|
581
|
+
- **`CometChat.CALL_TYPE.AUDIO` vs `.VIDEO` (Chat SDK)** are NOT the same as **`CometChatCalls.constants.TYPE.VOICE` / `.VIDEO` (Calls SDK)** — use Chat SDK enum on the `Call` entity, Calls SDK enum on `CallSettings`. See `cometchat-react-calls` §4c constants table.
|
|
582
|
+
- **`setIsAudioOnlyCall(true)` on `CallSettingsBuilder`** for voice calls — without it, voice calls still acquire the camera (just don't render it).
|
|
583
|
+
- **`joinSession` MUST fire after the container is mounted** — don't call it inside the `onOutgoingCallAccepted` listener directly; set state and let a `useEffect(phase, containerRef)` join when the ref + phase agree. The natural site fires before the in-call panel renders.
|
|
584
|
+
- **Group calls have no "ring a group" primitive** — use a CustomMessage broadcast + a shared sessionId; the UI Kit's `CometChatCallButtons` for groups sends a `meeting`-type CustomMessage, not `initiateCall`. SDK-only mirrors that.
|
|
585
|
+
- **Default call types** — 1:1 = video, group = voice (mirroring the kit's defaults). If you build custom buttons, replicate this so customers' integrations behave consistently.
|
|
586
|
+
- **`CometChatCalls.login` is mandatory on raw-SDK paths** (NOT when using the UI Kit, where `enableCalls = true` / kit-managed init auto-logs the Calls SDK). On raw SDK, after Chat SDK login, separately call `CometChatCalls.login(uid, apiKey)` — without it, `generateToken` returns 401.
|
|
587
|
+
|
|
588
|
+
These map to the React-specific recipes in `cometchat-react-calls` §4c. Same primitives apply across families; container-mount race + ref-state coordination is generic.
|
|
589
|
+
|
|
323
590
|
### AI smart replies
|
|
324
591
|
|
|
325
592
|
Smart replies is an `ai-feature`. Enable with one CLI call (the first time also sets the OpenAI key on the app):
|
|
@@ -402,25 +669,36 @@ export function useUserPresence(uid: string): "online" | "offline" | "unknown" {
|
|
|
402
669
|
|
|
403
670
|
---
|
|
404
671
|
|
|
405
|
-
## 5. Docs
|
|
672
|
+
## 5. Docs lookup contract
|
|
406
673
|
|
|
407
|
-
|
|
408
|
-
|
|
674
|
+
For any feature question not in our local catalog (`cometchat features
|
|
675
|
+
info`), the canonical CometChat docs are the source of truth for:
|
|
409
676
|
|
|
677
|
+
- **Feature/method availability matrix** — [Features & Extensions Guide](https://www.cometchat.com/docs/fundamentals/features-and-extensions-guide): which of UI Kit / UI Kit Builder / Widget Builder / SDK supports each feature, dashboard setup, and code-required flags. **This page outranks the local `catalog.json` snapshot when they disagree.**
|
|
410
678
|
- Per-feature SDK reference (props, callbacks, builders, events)
|
|
411
679
|
- Per-feature configuration details beyond the dashboard path above
|
|
412
680
|
- Feature compatibility notes (which features need backend setup,
|
|
413
681
|
which auto-wire, which require explicit `setExtensions([...])`)
|
|
414
682
|
|
|
683
|
+
The docs MCP at `cometchat-docs` is the **best** way to query them when
|
|
684
|
+
available, but it is **not** a hard requirement.
|
|
685
|
+
|
|
415
686
|
**Hard rules:**
|
|
416
687
|
|
|
417
|
-
1. **
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
688
|
+
1. **Look up the docs before answering** any feature question that's not
|
|
689
|
+
in our local catalog. Never invent feature config from training-data
|
|
690
|
+
memory. Use whichever lookup path is available, in order:
|
|
691
|
+
- **(a) docs MCP** — query the `cometchat-docs` MCP tool if your agent
|
|
692
|
+
has it. Richest path.
|
|
693
|
+
- **(b) install the MCP, if your agent supports it** — Claude Code:
|
|
694
|
+
`claude mcp add --transport http cometchat-docs
|
|
695
|
+
https://www.cometchat.com/docs/mcp`. Other agents (Cursor, Codex,
|
|
696
|
+
Cline, …) configure MCP their own way, or not at all — do NOT block.
|
|
697
|
+
- **(c) fetch/search the public docs** — same content at the canonical
|
|
698
|
+
URLs below, or web-search `site:cometchat.com/docs`. Universal
|
|
699
|
+
fallback; never STOP and dead-end the user when the MCP isn't
|
|
700
|
+
installed — fall through to (c).
|
|
701
|
+
2. **Use `cometchat apply-feature <id>` for extension and ai-feature
|
|
424
702
|
types.** The CLI is the canonical path. Only fall back to the
|
|
425
703
|
dashboard URL when the CLI returns `manual-action-required`,
|
|
426
704
|
`auth-required`, or `error`.
|
|
@@ -470,8 +748,9 @@ the type, query the docs MCP first.
|
|
|
470
748
|
advanced dual-scope search if the user wants that)
|
|
471
749
|
- "filter conversations / messages" → `conversationsRequestBuilder`
|
|
472
750
|
/ `messagesRequestBuilder`
|
|
473
|
-
- "custom empty / error / loading state" → `
|
|
474
|
-
`
|
|
751
|
+
- "custom empty / error / loading state" → `emptyView`,
|
|
752
|
+
`errorView`, `loadingView` on the list components (verified vs the v6
|
|
753
|
+
React kit; the `*StateView` form is only on `CometChatNotificationFeed`)
|
|
475
754
|
- "custom message bubble" → `templates` prop on
|
|
476
755
|
`CometChatMessageList` (NOT a custom bubble component)
|
|
477
756
|
- "hide / disable a sub-feature" → `disable*` boolean props
|
|
@@ -3,13 +3,14 @@ name: cometchat-flutter-v5
|
|
|
3
3
|
description: "Use when building chat with CometChat Flutter UIKit v5 (cometchat_chat_uikit v5.2.14, cometchat_calls_uikit v5.0.15). Orchestrator skill that routes to feature-specific skills."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "cometchat_chat_uikit ^5.2.14; cometchat_calls_uikit ^5.0.15; cometchat_uikit_shared ^5.2.3; cometchat_sdk ^4.1.2; get ^4.6.5"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
10
9
|
tags: "cometchat flutter v5 chat uikit messaging conversations getx"
|
|
11
10
|
---
|
|
12
11
|
|
|
12
|
+
> **Ground truth:** `cometchat_chat_uikit: ^5.2` (legacy/maintenance-only; calls via raw `cometchat_calls_sdk ^5.0.2`) — pub-cache source + `ui-kit/flutter/v5`. **Official docs:** https://www.cometchat.com/docs/ui-kit/flutter/v5/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
|
|
13
|
+
|
|
13
14
|
# CometChat Flutter UIKit v5 — Orchestrator
|
|
14
15
|
|
|
15
16
|
Entry point skill for the CometChat UIKit v5 packages. Routes to feature skills based on context.
|
|
@@ -21,9 +22,11 @@ Confirm the project uses CometChat UIKit v5 by checking `pubspec.yaml` for:
|
|
|
21
22
|
```yaml
|
|
22
23
|
dependencies:
|
|
23
24
|
cometchat_chat_uikit: ^5.2.14
|
|
24
|
-
cometchat_calls_uikit: ^5.0.15 #
|
|
25
|
+
cometchat_calls_uikit: ^5.0.15 # part of the v5 kit family — but NOT the calls path (see note)
|
|
25
26
|
```
|
|
26
27
|
|
|
28
|
+
> **⚠️ Voice/video calling does NOT use `cometchat_calls_uikit`.** Its prebuilt call widgets are **4.x-bound** (it transitively pins `cometchat_calls_sdk ^4.2.2`). Per the product policy that all families use the **V5 calls SDK**, Flutter V5 calling integrates the **raw `cometchat_calls_sdk ^5.0.2`** with a custom call surface — load **`cometchat-flutter-v5-calls`**. Do not add `cometchat_calls_uikit` for calls.
|
|
29
|
+
|
|
27
30
|
The v5 uses **separate packages** (unlike v6 which bundles everything):
|
|
28
31
|
- `cometchat_chat_uikit` — Chat UI components
|
|
29
32
|
- `cometchat_calls_uikit` — Call UI components (re-exports `cometchat_uikit_shared` + `cometchat_sdk` + `cometchat_calls_sdk`; does NOT re-export `cometchat_chat_uikit`)
|
|
@@ -60,6 +63,7 @@ import 'package:cometchat_calls_uikit/cometchat_calls_uikit.dart';
|
|
|
60
63
|
| calls, voice call, video call, CometChatCallButtons, incoming call, call logs | `cometchat-flutter-v5-calls` |
|
|
61
64
|
| events, listeners, real-time, typing indicator, online status, receipts | `cometchat-flutter-v5-events` |
|
|
62
65
|
| custom bubbles, templates, DataSource, decorator, formatters, slot views, extensions | `cometchat-flutter-v5-customization` |
|
|
66
|
+
| enable a feature, polls, reactions, stickers, message translation, AI, `apply-feature` | `cometchat-flutter-v6-features` (proxy — V5 has no separate features skill; feature *enablement* is the same `apply-feature`/dashboard path, only UI wiring differs; V5 is legacy/maintenance-only) |
|
|
63
67
|
| push notifications, FCM, APNs, VoIP, token, firebase messaging, callkit | `cometchat-flutter-v5-push` |
|
|
64
68
|
| auth tokens, ProGuard, release build, security, environment, production | `cometchat-flutter-v5-production` |
|
|
65
69
|
| error, debug, not working, crash, fix, troubleshoot, verify | `cometchat-flutter-v5-troubleshooting` |
|
|
@@ -111,9 +115,11 @@ class _MyAppState extends State<MyApp> {
|
|
|
111
115
|
..appId = appId
|
|
112
116
|
..region = region
|
|
113
117
|
..authKey = authKey
|
|
114
|
-
..subscriptionType = CometChatSubscriptionType.allUsers
|
|
115
|
-
..callingExtension = CometChatCallingExtension())
|
|
118
|
+
..subscriptionType = CometChatSubscriptionType.allUsers)
|
|
116
119
|
.build();
|
|
120
|
+
// For voice/video calls, also `import cometchat_calls_uikit` and add
|
|
121
|
+
// ..callingExtension = CometChatCallingExtension()
|
|
122
|
+
// to the builder above (see cometchat-flutter-v5-calls).
|
|
117
123
|
|
|
118
124
|
CometChatUIKit.init(
|
|
119
125
|
uiKitSettings: settings,
|