@cometchat/skills 4.4.2 → 5.0.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/.claude-plugin/marketplace.json +55 -0
- package/.claude-plugin/plugin.json +14 -0
- package/CHANGELOG.md +44 -0
- package/LICENSE +21 -0
- package/MIGRATING.md +187 -0
- package/README.md +52 -156
- package/RULES.md +125 -0
- package/bin/cometchat-skills.mjs +1280 -0
- package/bin/legacy-skills.json +95 -0
- package/catalogs/android-v6.json +1646 -0
- package/catalogs/flutter-v6.json +651 -0
- package/catalogs/ios-v5.json +1383 -0
- package/catalogs/rn-calls-v5.json +134 -0
- package/catalogs/rn-calls-v5.symbols.txt +58 -0
- package/catalogs/rn-sdk-v4.json +672 -0
- package/catalogs/rn-v5.json +449 -0
- package/catalogs/rn-v5.symbols.txt +216 -0
- package/catalogs/sdk-android-v5.json +514 -0
- package/contracts.android-calls-v5.json +122 -0
- package/contracts.android-v6.json +135 -0
- package/contracts.angular-v5.json +694 -0
- package/contracts.flutter-calls-v5.json +77 -0
- package/contracts.flutter-v6.json +126 -0
- package/contracts.ios-calls-v5.json +67 -0
- package/contracts.ios-v5.json +436 -0
- package/contracts.json +82 -0
- package/contracts.rn-calls-v5.json +77 -0
- package/contracts.rn-v5.json +727 -0
- package/contracts.sdk-android-v5.json +15 -0
- package/contracts.web-calls-v5.json +45 -0
- package/features.android-calls-v5.json +246 -0
- package/features.android-v6.json +65 -0
- package/features.angular-v5.json +521 -0
- package/features.flutter-calls-v5.json +286 -0
- package/features.flutter-v6.json +484 -0
- package/features.ios-calls-v5.json +236 -0
- package/features.ios-v5.json +573 -0
- package/features.json +61 -0
- package/features.rn-calls-v5.json +187 -0
- package/features.rn-v5.json +614 -0
- package/features.sdk-android-v5.json +40 -0
- package/features.sdk-jsv4.json +24 -0
- package/features.web-calls-v5.json +108 -0
- package/package.json +156 -74
- package/peers.yaml +355 -0
- package/registry/README.md +31 -0
- package/registry/android-calls-v5.json +94 -0
- package/registry/android-v6.json +177 -0
- package/registry/angular-v5.json +154 -0
- package/registry/flutter-calls-v5.json +94 -0
- package/registry/flutter-v6.json +159 -0
- package/registry/ios-calls-v5.json +99 -0
- package/registry/ios-v5.json +152 -0
- package/registry/rn-calls-v5.json +99 -0
- package/registry/rn-v5.json +169 -0
- package/registry/sdk-android-v5.json +93 -0
- package/registry/sdk-jsv4.json +93 -0
- package/registry/web-calls-v5.json +94 -0
- package/registry/web-v7.json +154 -0
- package/skills/cometchat/SKILL.md +47 -2096
- package/skills/cometchat-a11y/SKILL.md +44 -472
- package/skills/cometchat-analytics/SKILL.md +61 -0
- package/skills/cometchat-android-v5-calls-sdk/SKILL.md +206 -0
- package/skills/cometchat-android-v5-calls-sdk/references/build-truth.md +63 -0
- package/skills/cometchat-android-v5-calls-sdk/references/docs-map.md +119 -0
- package/skills/cometchat-android-v5-calls-sdk/references/method-map.md +53 -0
- package/skills/cometchat-android-v5-calls-sdk/references/pitfalls.md +72 -0
- package/skills/cometchat-android-v5-calls-sdk/references/ringing.md +92 -0
- package/skills/cometchat-android-v5-calls-sdk/references/user-switch.md +90 -0
- package/skills/cometchat-android-v5-sdk/SKILL.md +127 -0
- package/skills/cometchat-android-v5-sdk/references/app-surface.md +88 -0
- package/skills/cometchat-android-v5-sdk/references/docs-map.md +91 -0
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +51 -137
- package/skills/cometchat-android-v6-calls/SKILL.md +128 -413
- package/skills/cometchat-android-v6-compose-components/SKILL.md +84 -194
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +66 -411
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +154 -237
- package/skills/cometchat-android-v6-core/SKILL.md +236 -672
- package/skills/cometchat-android-v6-core/references/anti-patterns.md +31 -0
- package/skills/cometchat-android-v6-core/references/component-props.md +168 -0
- package/skills/cometchat-android-v6-core/references/docs-map.md +153 -0
- package/skills/cometchat-android-v6-core/references/layout.md +112 -0
- package/skills/cometchat-android-v6-core/references/lifecycle.md +75 -0
- package/skills/cometchat-android-v6-core/references/setup-credentials.md +105 -0
- package/skills/cometchat-android-v6-core/references/troubleshooting.md +36 -0
- package/skills/cometchat-android-v6-events/SKILL.md +46 -184
- package/skills/cometchat-android-v6-extensions/SKILL.md +39 -179
- package/skills/cometchat-android-v6-features/SKILL.md +74 -143
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +75 -193
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +67 -419
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +77 -223
- package/skills/cometchat-android-v6-migration/SKILL.md +67 -378
- package/skills/cometchat-android-v6-production/SKILL.md +41 -179
- package/skills/cometchat-android-v6-push/SKILL.md +39 -289
- package/skills/cometchat-android-v6-testing/SKILL.md +50 -265
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +70 -254
- package/skills/cometchat-angular-v5-calls/SKILL.md +193 -0
- package/skills/cometchat-angular-v5-components/SKILL.md +131 -0
- package/skills/cometchat-angular-v5-components/references/catalog.md +111 -0
- package/skills/cometchat-angular-v5-components/references/host-composed.md +46 -0
- package/skills/cometchat-angular-v5-core/SKILL.md +300 -0
- package/skills/cometchat-angular-v5-core/references/anti-patterns.md +49 -0
- package/skills/cometchat-angular-v5-core/references/component-props.md +55 -0
- package/skills/cometchat-angular-v5-core/references/dependencies.md +66 -0
- package/skills/cometchat-angular-v5-core/references/docs-map.md +132 -0
- package/skills/cometchat-angular-v5-core/references/layout.md +64 -0
- package/skills/cometchat-angular-v5-core/references/lifecycle.md +202 -0
- package/skills/cometchat-angular-v5-core/references/setup-credentials.md +137 -0
- package/skills/cometchat-angular-v5-core/references/theming.md +70 -0
- package/skills/cometchat-angular-v5-core/references/troubleshooting.md +27 -0
- package/skills/cometchat-angular-v5-customization/SKILL.md +94 -0
- package/skills/cometchat-angular-v5-features/SKILL.md +107 -0
- package/skills/cometchat-angular-v5-features/references/custom-messages.md +133 -0
- package/skills/cometchat-angular-v5-features/references/formatters.md +28 -0
- package/skills/cometchat-angular-v5-features/references/host-composed-extensions.md +85 -0
- package/skills/cometchat-angular-v5-migration/SKILL.md +40 -0
- package/skills/cometchat-angular-v5-migration/references/migration-guide.md +165 -0
- package/skills/cometchat-angular-v5-patterns/SKILL.md +107 -0
- package/skills/cometchat-angular-v5-placement/SKILL.md +133 -0
- package/skills/cometchat-angular-v5-placement/references/combined-app.md +174 -0
- package/skills/cometchat-angular-v5-placement/references/core-surface.md +199 -0
- package/skills/cometchat-angular-v5-production/SKILL.md +102 -0
- package/skills/cometchat-angular-v5-push/SKILL.md +61 -0
- package/skills/cometchat-angular-v5-testing/SKILL.md +112 -0
- package/skills/cometchat-angular-v5-troubleshooting/SKILL.md +96 -0
- package/skills/cometchat-audit/SKILL.md +61 -0
- package/skills/cometchat-compliance/SKILL.md +63 -0
- package/skills/cometchat-flutter-v5-sdk/SKILL.md +188 -0
- package/skills/cometchat-flutter-v5-sdk/references/doc-corrections.md +55 -0
- package/skills/cometchat-flutter-v5-sdk/references/docs-map.md +211 -0
- package/skills/cometchat-flutter-v5-sdk/references/platform-notes.md +48 -0
- package/skills/cometchat-flutter-v5-sdk/references/transcription.md +87 -0
- package/skills/cometchat-flutter-v6-calls/SKILL.md +75 -389
- package/skills/cometchat-flutter-v6-components/SKILL.md +88 -361
- package/skills/cometchat-flutter-v6-core/SKILL.md +154 -593
- package/skills/cometchat-flutter-v6-core/references/anti-patterns.md +55 -0
- package/skills/cometchat-flutter-v6-core/references/docs-map.md +143 -0
- package/skills/cometchat-flutter-v6-core/references/layout.md +45 -0
- package/skills/cometchat-flutter-v6-core/references/lifecycle.md +87 -0
- package/skills/cometchat-flutter-v6-core/references/setup-credentials.md +84 -0
- package/skills/cometchat-flutter-v6-core/references/troubleshooting.md +26 -0
- package/skills/cometchat-flutter-v6-customization/SKILL.md +70 -712
- package/skills/cometchat-flutter-v6-events/SKILL.md +79 -174
- package/skills/cometchat-flutter-v6-features/SKILL.md +55 -394
- package/skills/cometchat-flutter-v6-migration/SKILL.md +68 -367
- package/skills/cometchat-flutter-v6-migration/references/migration-guide.md +132 -0
- package/skills/cometchat-flutter-v6-patterns/SKILL.md +61 -0
- package/skills/cometchat-flutter-v6-placement/SKILL.md +94 -381
- package/skills/cometchat-flutter-v6-production/SKILL.md +59 -615
- package/skills/cometchat-flutter-v6-push/SKILL.md +46 -455
- package/skills/cometchat-flutter-v6-testing/SKILL.md +68 -299
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +54 -878
- package/skills/cometchat-i18n/SKILL.md +35 -404
- package/skills/cometchat-ios-calls/SKILL.md +112 -563
- package/skills/cometchat-ios-components/SKILL.md +44 -834
- package/skills/cometchat-ios-core/SKILL.md +182 -1068
- package/skills/cometchat-ios-core/references/anti-patterns.md +113 -0
- package/skills/cometchat-ios-core/references/docs-map.md +124 -0
- package/skills/cometchat-ios-core/references/install.md +23 -0
- package/skills/cometchat-ios-core/references/layout.md +219 -0
- package/skills/cometchat-ios-core/references/setup-credentials.md +197 -0
- package/skills/cometchat-ios-core/references/swiftui.md +91 -0
- package/skills/cometchat-ios-core/references/troubleshooting.md +100 -0
- package/skills/cometchat-ios-customization/SKILL.md +33 -968
- package/skills/cometchat-ios-features/SKILL.md +29 -738
- package/skills/cometchat-ios-migration/SKILL.md +39 -0
- package/skills/cometchat-ios-placement/SKILL.md +51 -729
- package/skills/cometchat-ios-production/SKILL.md +67 -723
- package/skills/cometchat-ios-push/SKILL.md +24 -602
- package/skills/cometchat-ios-testing/SKILL.md +36 -355
- package/skills/cometchat-ios-troubleshooting/SKILL.md +31 -989
- package/skills/cometchat-ios-v5-sdk/SKILL.md +161 -0
- package/skills/cometchat-ios-v5-sdk/references/docs-map.md +326 -0
- package/skills/cometchat-js-v5-sdk/SKILL.md +95 -0
- package/skills/cometchat-js-v5-sdk/references/docs-map.md +114 -0
- package/skills/cometchat-migrate-from-getstream/SKILL.md +65 -0
- package/skills/cometchat-migrate-from-getstream/references/concept-map.md +98 -0
- package/skills/cometchat-migrate-from-getstream/references/data-migration.md +74 -0
- package/skills/cometchat-migrate-from-getstream/references/feature-map.md +108 -0
- package/skills/cometchat-migrate-from-getstream/references/inventory.md +82 -0
- package/skills/cometchat-migrate-from-getstream/references/native-build.md +9 -0
- package/skills/cometchat-migrate-from-getstream/references/report-template.md +59 -0
- package/skills/cometchat-migrate-from-sendbird/SKILL.md +64 -0
- package/skills/cometchat-migrate-from-sendbird/references/concept-map.md +99 -0
- package/skills/cometchat-migrate-from-sendbird/references/data-migration.md +74 -0
- package/skills/cometchat-migrate-from-sendbird/references/feature-map.md +104 -0
- package/skills/cometchat-migrate-from-sendbird/references/inventory.md +86 -0
- package/skills/cometchat-migrate-from-sendbird/references/native-build.md +10 -0
- package/skills/cometchat-migrate-from-sendbird/references/report-template.md +59 -0
- package/skills/cometchat-migrate-from-twilio/SKILL.md +52 -0
- package/skills/cometchat-migrate-from-twilio/references/concept-map.md +49 -0
- package/skills/cometchat-migrate-from-twilio/references/data-migration.md +50 -0
- package/skills/cometchat-migrate-from-twilio/references/feature-map.md +27 -0
- package/skills/cometchat-migrate-from-twilio/references/inventory.md +53 -0
- package/skills/cometchat-migrate-from-twilio/references/report-template.md +52 -0
- package/skills/cometchat-moderation/SKILL.md +58 -0
- package/skills/cometchat-onboarding/SKILL.md +92 -0
- package/skills/cometchat-onboarding/references/archetypes.md +51 -0
- package/skills/cometchat-onboarding/references/calling-first.md +77 -0
- package/skills/cometchat-onboarding/references/not-in-this-pack.md +8 -0
- package/skills/cometchat-onboarding/references/plan-artifact.md +133 -0
- package/skills/cometchat-onboarding/references/platforms.md +105 -0
- package/skills/cometchat-react-native-bare-patterns/SKILL.md +120 -0
- package/skills/cometchat-react-native-calls/SKILL.md +200 -0
- package/skills/cometchat-react-native-components/SKILL.md +142 -0
- package/skills/cometchat-react-native-core/SKILL.md +335 -0
- package/skills/cometchat-react-native-core/references/anti-patterns.md +79 -0
- package/skills/cometchat-react-native-core/references/component-props.md +105 -0
- package/skills/cometchat-react-native-core/references/dependencies.md +62 -0
- package/skills/cometchat-react-native-core/references/docs-map.md +127 -0
- package/skills/cometchat-react-native-core/references/layout.md +61 -0
- package/skills/cometchat-react-native-core/references/lifecycle.md +64 -0
- package/skills/cometchat-react-native-core/references/setup-credentials.md +39 -0
- package/skills/cometchat-react-native-customization/SKILL.md +198 -0
- package/skills/cometchat-react-native-expo-patterns/SKILL.md +116 -0
- package/skills/cometchat-react-native-features/SKILL.md +122 -0
- package/skills/cometchat-react-native-migration/SKILL.md +103 -0
- package/skills/cometchat-react-native-placement/SKILL.md +158 -0
- package/skills/cometchat-react-native-production/SKILL.md +79 -0
- package/skills/cometchat-react-native-push/SKILL.md +88 -0
- package/skills/cometchat-react-native-sdk/SKILL.md +133 -0
- package/skills/cometchat-react-native-sdk/references/method-map.md +239 -0
- package/skills/cometchat-react-native-sdk/references/page-map.md +96 -0
- package/skills/cometchat-react-native-testing/SKILL.md +94 -0
- package/skills/cometchat-react-native-troubleshooting/SKILL.md +174 -0
- package/skills/cometchat-react-native-v5-sdk/SKILL.md +150 -0
- package/skills/cometchat-react-native-v5-sdk/references/docs-map.md +127 -0
- package/skills/cometchat-react-native-v5-sdk/references/ringing-voip.md +369 -0
- package/skills/cometchat-react-v7-calls/SKILL.md +75 -0
- package/skills/cometchat-react-v7-components/SKILL.md +72 -0
- package/skills/cometchat-react-v7-core/SKILL.md +101 -0
- package/skills/cometchat-react-v7-core/references/anti-patterns.md +19 -0
- package/skills/cometchat-react-v7-core/references/component-props.md +82 -0
- package/skills/cometchat-react-v7-core/references/dependencies.md +23 -0
- package/skills/cometchat-react-v7-core/references/docs-map.md +117 -0
- package/skills/cometchat-react-v7-core/references/layout.md +150 -0
- package/skills/cometchat-react-v7-core/references/lifecycle.md +74 -0
- package/skills/cometchat-react-v7-core/references/setup-credentials.md +58 -0
- package/skills/cometchat-react-v7-core/references/ssr.md +11 -0
- package/skills/cometchat-react-v7-core/references/theming.md +52 -0
- package/skills/cometchat-react-v7-customization/SKILL.md +84 -0
- package/skills/cometchat-react-v7-features/SKILL.md +92 -0
- package/skills/cometchat-react-v7-migration/SKILL.md +39 -0
- package/skills/cometchat-react-v7-migration/references/migration-guide.md +119 -0
- package/skills/cometchat-react-v7-patterns/SKILL.md +43 -0
- package/skills/cometchat-react-v7-placement/SKILL.md +106 -0
- package/skills/cometchat-react-v7-placement/references/recipes.md +354 -0
- package/skills/cometchat-react-v7-production/SKILL.md +84 -0
- package/skills/cometchat-react-v7-push/SKILL.md +53 -0
- package/skills/cometchat-react-v7-testing/SKILL.md +60 -0
- package/skills/cometchat-react-v7-troubleshooting/SKILL.md +47 -0
- package/skills/cometchat-security/SKILL.md +80 -0
- package/skills/cometchat-self-host/SKILL.md +56 -0
- package/test-suite/README.md +70 -0
- package/test-suite/catalogs/android-calls-v5.json +830 -0
- package/test-suite/catalogs/android-calls-v5.symbols.txt +499 -0
- package/test-suite/catalogs/android-v6.json +1646 -0
- package/test-suite/catalogs/android-v6.symbols.txt +298 -0
- package/test-suite/catalogs/angular-v5.json +7587 -0
- package/test-suite/catalogs/flutter-calls-v5.json +196 -0
- package/test-suite/catalogs/flutter-calls-v5.symbols.txt +59 -0
- package/test-suite/catalogs/flutter-v6.json +651 -0
- package/test-suite/catalogs/ios-calls-v5.json +158 -0
- package/test-suite/catalogs/ios-calls-v5.symbols.txt +70 -0
- package/test-suite/catalogs/ios-v5.json +1383 -0
- package/test-suite/catalogs/ios-v5.symbols.txt +699 -0
- package/test-suite/catalogs/rn-calls-v5.json +134 -0
- package/test-suite/catalogs/rn-sdk-v4.json +672 -0
- package/test-suite/catalogs/rn-v5.json +449 -0
- package/test-suite/catalogs/sdk-android-v5.json +514 -0
- package/test-suite/catalogs/sdk-android-v5.symbols.txt +254 -0
- package/test-suite/catalogs/sdk-jsv4.json +800 -0
- package/test-suite/catalogs/web-calls-v5.json +195 -0
- package/test-suite/catalogs/web-v7.json +1243 -0
- package/test-suite/scripts/build-registry.mjs +113 -0
- package/test-suite/scripts/catalog-refresh-dart.mjs +151 -0
- package/test-suite/scripts/catalog-refresh.mjs +100 -0
- package/test-suite/scripts/lint-skills.mjs +932 -0
- package/test-suite/scripts/measure-tokens.mjs +169 -0
- package/test-suite/scripts/typecheck-fences-dart.mjs +437 -0
- package/test-suite/scripts/typecheck-fences-kotlin.mjs +269 -0
- package/test-suite/scripts/typecheck-fences.mjs +206 -0
- package/test-suite/scripts/verify-catalog.mjs +242 -0
- package/test-suite/scripts/verify-contract-fences.mjs +94 -0
- package/test-suite/scripts/verify-detection.mjs +178 -0
- package/test-suite/scripts/verify-docs-base.mjs +91 -0
- package/test-suite/scripts/verify-family-agnostic.mjs +134 -0
- package/test-suite/scripts/verify-golden-path.mjs +138 -0
- package/test-suite/scripts/verify-oracle-components.mjs +133 -0
- package/test-suite/scripts/verify-template-bindings.mjs +148 -0
- package/test-suite/typecheck/angular-v5/package.json +21 -0
- package/test-suite/typecheck/angular-v5/tsconfig.json +21 -0
- package/test-suite/typecheck/flutter-v6/analysis_options.yaml +25 -0
- package/test-suite/typecheck/flutter-v6/pubspec.yaml +21 -0
- package/test-suite/typecheck/web-v7/package.json +18 -0
- package/test-suite/typecheck/web-v7/tsconfig.json +19 -0
- package/bin/install.js +0 -1003
- package/skills/.claude-plugin/marketplace.json +0 -86
- package/skills/cometchat/references/asking-questions.md +0 -48
- package/skills/cometchat-android-v5/SKILL.md +0 -121
- package/skills/cometchat-android-v5-calls/SKILL.md +0 -429
- package/skills/cometchat-android-v5-calls/references/README.md +0 -53
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +0 -197
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +0 -91
- package/skills/cometchat-android-v5-calls/references/background-handling.md +0 -168
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +0 -131
- package/skills/cometchat-android-v5-calls/references/call-logs.md +0 -113
- package/skills/cometchat-android-v5-calls/references/call-session.md +0 -274
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +0 -150
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +0 -123
- package/skills/cometchat-android-v5-calls/references/group-calls.md +0 -205
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +0 -117
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +0 -134
- package/skills/cometchat-android-v5-calls/references/join-session.md +0 -120
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +0 -222
- package/skills/cometchat-android-v5-calls/references/participant-management.md +0 -110
- package/skills/cometchat-android-v5-calls/references/picture-in-picture.md +0 -106
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +0 -248
- package/skills/cometchat-android-v5-calls/references/recording.md +0 -101
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +0 -152
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +0 -78
- package/skills/cometchat-android-v5-calls/references/server-fcm-voip.md +0 -215
- package/skills/cometchat-android-v5-calls/references/session-settings.md +0 -121
- package/skills/cometchat-android-v5-calls/references/setup.md +0 -137
- package/skills/cometchat-android-v5-calls/references/share-invite.md +0 -156
- package/skills/cometchat-android-v5-calls/references/video-controls.md +0 -87
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +0 -526
- package/skills/cometchat-android-v5-components/SKILL.md +0 -431
- package/skills/cometchat-android-v5-core/SKILL.md +0 -486
- package/skills/cometchat-android-v5-customization/SKILL.md +0 -469
- package/skills/cometchat-android-v5-extensions/SKILL.md +0 -127
- package/skills/cometchat-android-v5-features/SKILL.md +0 -131
- package/skills/cometchat-android-v5-placement/SKILL.md +0 -277
- package/skills/cometchat-android-v5-production/SKILL.md +0 -95
- package/skills/cometchat-android-v5-push/SKILL.md +0 -619
- package/skills/cometchat-android-v5-testing/SKILL.md +0 -188
- package/skills/cometchat-android-v5-theming/SKILL.md +0 -167
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +0 -74
- package/skills/cometchat-android-v6/SKILL.md +0 -108
- package/skills/cometchat-android-v6-calls/references/add-calls-to-existing-chat.md +0 -97
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +0 -87
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +0 -100
- package/skills/cometchat-android-v6-calls/references/call-session.md +0 -163
- package/skills/cometchat-android-v6-calls/references/device-management.md +0 -172
- package/skills/cometchat-android-v6-calls/references/group-calls.md +0 -191
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +0 -110
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +0 -141
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +0 -188
- package/skills/cometchat-android-v6-calls/references/ringing-integration.md +0 -176
- package/skills/cometchat-android-v6-calls/references/server-fcm-voip.md +0 -127
- package/skills/cometchat-android-v6-calls/references/share-invite.md +0 -105
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +0 -250
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +0 -233
- package/skills/cometchat-angular-calls/SKILL.md +0 -380
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +0 -96
- package/skills/cometchat-angular-calls/references/call-layouts.md +0 -123
- package/skills/cometchat-angular-calls/references/call-session.md +0 -167
- package/skills/cometchat-angular-calls/references/custom-ui.md +0 -239
- package/skills/cometchat-angular-calls/references/device-management.md +0 -154
- package/skills/cometchat-angular-calls/references/group-calls.md +0 -433
- package/skills/cometchat-angular-calls/references/idle-timeout.md +0 -161
- package/skills/cometchat-angular-calls/references/in-call-chat.md +0 -148
- package/skills/cometchat-angular-calls/references/lazy-loading-pitfalls.md +0 -205
- package/skills/cometchat-angular-calls/references/migration-v4-to-v5.md +0 -53
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +0 -184
- package/skills/cometchat-angular-calls/references/picture-in-picture.md +0 -285
- package/skills/cometchat-angular-calls/references/raise-hand.md +0 -172
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +0 -260
- package/skills/cometchat-angular-calls/references/ringing-integration.md +0 -133
- package/skills/cometchat-angular-calls/references/server-web-push-vapid.md +0 -100
- package/skills/cometchat-angular-calls/references/share-invite.md +0 -122
- package/skills/cometchat-angular-calls/references/virtual-background.md +0 -29
- package/skills/cometchat-angular-components/SKILL.md +0 -235
- package/skills/cometchat-angular-core/SKILL.md +0 -386
- package/skills/cometchat-angular-customization/SKILL.md +0 -616
- package/skills/cometchat-angular-features/SKILL.md +0 -329
- package/skills/cometchat-angular-patterns/SKILL.md +0 -256
- package/skills/cometchat-angular-placement/SKILL.md +0 -314
- package/skills/cometchat-angular-production/SKILL.md +0 -564
- package/skills/cometchat-angular-push/SKILL.md +0 -389
- package/skills/cometchat-angular-testing/SKILL.md +0 -605
- package/skills/cometchat-angular-theming/SKILL.md +0 -290
- package/skills/cometchat-angular-troubleshooting/SKILL.md +0 -364
- package/skills/cometchat-astro-patterns/SKILL.md +0 -708
- package/skills/cometchat-calls/SKILL.md +0 -364
- package/skills/cometchat-calls/references/use-case-broadcast.md +0 -199
- package/skills/cometchat-calls/references/use-case-marketplace.md +0 -157
- package/skills/cometchat-calls/references/use-case-support.md +0 -189
- package/skills/cometchat-calls/references/use-case-team.md +0 -180
- package/skills/cometchat-calls/references/use-case-telehealth.md +0 -153
- package/skills/cometchat-components/SKILL.md +0 -1142
- package/skills/cometchat-core/SKILL.md +0 -1048
- package/skills/cometchat-customization/SKILL.md +0 -580
- package/skills/cometchat-customization/references/component-catalog.md +0 -236
- package/skills/cometchat-features/SKILL.md +0 -861
- package/skills/cometchat-flutter-v5/SKILL.md +0 -173
- package/skills/cometchat-flutter-v5-calls/SKILL.md +0 -455
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +0 -193
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +0 -103
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +0 -285
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +0 -124
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +0 -181
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +0 -99
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +0 -135
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +0 -210
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +0 -255
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +0 -196
- package/skills/cometchat-flutter-v5-calls/references/server-push-bridge.md +0 -101
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +0 -148
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +0 -118
- package/skills/cometchat-flutter-v5-core/SKILL.md +0 -239
- package/skills/cometchat-flutter-v5-customization/SKILL.md +0 -358
- package/skills/cometchat-flutter-v5-events/SKILL.md +0 -156
- package/skills/cometchat-flutter-v5-messages/SKILL.md +0 -259
- package/skills/cometchat-flutter-v5-production/SKILL.md +0 -216
- package/skills/cometchat-flutter-v5-push/SKILL.md +0 -285
- package/skills/cometchat-flutter-v5-testing/SKILL.md +0 -401
- package/skills/cometchat-flutter-v5-theming/SKILL.md +0 -161
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +0 -130
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +0 -152
- package/skills/cometchat-flutter-v6/SKILL.md +0 -446
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +0 -136
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +0 -89
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +0 -105
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +0 -229
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +0 -105
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +0 -190
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +0 -88
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +0 -125
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +0 -275
- package/skills/cometchat-flutter-v6-calls/references/ringing-integration.md +0 -171
- package/skills/cometchat-flutter-v6-calls/references/server-push-bridge.md +0 -93
- package/skills/cometchat-flutter-v6-calls/references/share-invite.md +0 -102
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +0 -238
- package/skills/cometchat-flutter-v6-messages/SKILL.md +0 -384
- package/skills/cometchat-flutter-v6-theming/SKILL.md +0 -293
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +0 -224
- package/skills/cometchat-ios/SKILL.md +0 -325
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +0 -181
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +0 -45
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +0 -188
- package/skills/cometchat-ios-calls/references/call-layouts.md +0 -76
- package/skills/cometchat-ios-calls/references/call-session.md +0 -218
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +0 -357
- package/skills/cometchat-ios-calls/references/custom-ui.md +0 -322
- package/skills/cometchat-ios-calls/references/device-management.md +0 -171
- package/skills/cometchat-ios-calls/references/group-calls.md +0 -359
- package/skills/cometchat-ios-calls/references/idle-timeout.md +0 -184
- package/skills/cometchat-ios-calls/references/in-call-chat.md +0 -179
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +0 -196
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +0 -246
- package/skills/cometchat-ios-calls/references/raise-hand.md +0 -26
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +0 -252
- package/skills/cometchat-ios-calls/references/ringing-integration.md +0 -143
- package/skills/cometchat-ios-calls/references/server-apns-pushkit.md +0 -267
- package/skills/cometchat-ios-calls/references/share-invite.md +0 -148
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +0 -246
- package/skills/cometchat-ios-calls/references/voip-cert-setup.md +0 -166
- package/skills/cometchat-ios-theming/SKILL.md +0 -667
- package/skills/cometchat-native-bare-patterns/SKILL.md +0 -550
- package/skills/cometchat-native-calls/SKILL.md +0 -671
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +0 -203
- package/skills/cometchat-native-calls/references/call-layouts.md +0 -125
- package/skills/cometchat-native-calls/references/call-session.md +0 -182
- package/skills/cometchat-native-calls/references/custom-ui.md +0 -254
- package/skills/cometchat-native-calls/references/device-management.md +0 -158
- package/skills/cometchat-native-calls/references/expo-vs-bare.md +0 -179
- package/skills/cometchat-native-calls/references/group-calls.md +0 -296
- package/skills/cometchat-native-calls/references/idle-timeout.md +0 -128
- package/skills/cometchat-native-calls/references/in-call-chat.md +0 -145
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +0 -72
- package/skills/cometchat-native-calls/references/picture-in-picture.md +0 -276
- package/skills/cometchat-native-calls/references/raise-hand.md +0 -205
- package/skills/cometchat-native-calls/references/recording-screen-share.md +0 -169
- package/skills/cometchat-native-calls/references/ringing-integration.md +0 -118
- package/skills/cometchat-native-calls/references/server-push-bridge.md +0 -135
- package/skills/cometchat-native-calls/references/server-push-payloads.md +0 -193
- package/skills/cometchat-native-calls/references/share-invite.md +0 -146
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +0 -319
- package/skills/cometchat-native-components/SKILL.md +0 -628
- package/skills/cometchat-native-core/SKILL.md +0 -679
- package/skills/cometchat-native-customization/SKILL.md +0 -716
- package/skills/cometchat-native-expo-patterns/SKILL.md +0 -552
- package/skills/cometchat-native-features/SKILL.md +0 -638
- package/skills/cometchat-native-placement/SKILL.md +0 -509
- package/skills/cometchat-native-production/SKILL.md +0 -700
- package/skills/cometchat-native-push/SKILL.md +0 -594
- package/skills/cometchat-native-testing/SKILL.md +0 -582
- package/skills/cometchat-native-theming/SKILL.md +0 -681
- package/skills/cometchat-native-troubleshooting/SKILL.md +0 -501
- package/skills/cometchat-nextjs-patterns/SKILL.md +0 -899
- package/skills/cometchat-placement/SKILL.md +0 -1360
- package/skills/cometchat-production/SKILL.md +0 -1027
- package/skills/cometchat-react-calls/SKILL.md +0 -752
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +0 -146
- package/skills/cometchat-react-calls/references/call-layouts.md +0 -160
- package/skills/cometchat-react-calls/references/call-session.md +0 -235
- package/skills/cometchat-react-calls/references/custom-ui.md +0 -247
- package/skills/cometchat-react-calls/references/device-management.md +0 -210
- package/skills/cometchat-react-calls/references/group-calls.md +0 -257
- package/skills/cometchat-react-calls/references/idle-timeout.md +0 -188
- package/skills/cometchat-react-calls/references/in-call-chat.md +0 -212
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +0 -170
- package/skills/cometchat-react-calls/references/picture-in-picture.md +0 -245
- package/skills/cometchat-react-calls/references/raise-hand.md +0 -238
- package/skills/cometchat-react-calls/references/recording-screen-share.md +0 -144
- package/skills/cometchat-react-calls/references/ringing-integration.md +0 -255
- package/skills/cometchat-react-calls/references/server-web-push-vapid.md +0 -241
- package/skills/cometchat-react-calls/references/share-invite.md +0 -175
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +0 -216
- package/skills/cometchat-react-calls/references/virtual-background.md +0 -32
- package/skills/cometchat-react-calls/references/voip-and-web-push.md +0 -165
- package/skills/cometchat-react-patterns/SKILL.md +0 -628
- package/skills/cometchat-react-push/SKILL.md +0 -634
- package/skills/cometchat-react-router-patterns/SKILL.md +0 -758
- package/skills/cometchat-react-testing/SKILL.md +0 -413
- package/skills/cometchat-theming/SKILL.md +0 -498
- package/skills/cometchat-troubleshooting/SKILL.md +0 -294
|
@@ -1,1142 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: cometchat-components
|
|
3
|
-
description: "Complete catalog of CometChat React UI Kit v6 components. Reference before writing integration code -- never invent component names."
|
|
4
|
-
license: "MIT"
|
|
5
|
-
compatibility: "@cometchat/chat-uikit-react ^6; @cometchat/chat-sdk-javascript ^4"
|
|
6
|
-
metadata:
|
|
7
|
-
author: "CometChat"
|
|
8
|
-
version: "3.0.0"
|
|
9
|
-
tags: "chat cometchat react components catalog reference ui-kit"
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
> **Ground truth:** `@cometchat/chat-uikit-react@^6` component catalog (installed package types) + `docs/ui-kit/react`. **Official docs:** https://www.cometchat.com/docs/ui-kit/react/components-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
|
-
|
|
14
|
-
## Purpose
|
|
15
|
-
|
|
16
|
-
This is the single source of truth for CometChat React UI Kit v6 component names, props, and usage. **Check this catalog before writing any `<CometChat*>` JSX.** If a component is not listed here, it does not exist in the exported API.
|
|
17
|
-
|
|
18
|
-
All components are imported from `@cometchat/chat-uikit-react`. All SDK types are imported from `@cometchat/chat-sdk-javascript`.
|
|
19
|
-
|
|
20
|
-
## When to use
|
|
21
|
-
|
|
22
|
-
- Any React-family integration emitting `<CometChat*>` JSX: Vite + React, Next.js (App or Pages Router), React Router v6/v7, Astro with React islands.
|
|
23
|
-
- Before scaffolding any chat surface (conversations, messages, users, groups, calls UI).
|
|
24
|
-
- When verifying a component name or prop signature — this catalog is authoritative; the kit's `node_modules/@cometchat/chat-uikit-react/dist/types/` is the runtime source of truth that backs it.
|
|
25
|
-
|
|
26
|
-
## When NOT to use
|
|
27
|
-
|
|
28
|
-
- **React Native** (Expo or bare) — load `cometchat-native-components`. Class names are similar but **prop conventions diverge** (RN uses `onItemPress`, web uses `onItemClick` — runtime smoke 2026-06-02 confirmed). Cross-family copy-paste produces silent broken event bindings.
|
|
29
|
-
- **Angular** — load `cometchat-angular-components`. Angular kit class names are **`Component`-suffixed** (`CometChatConversationsComponent` not `CometChatConversations` — verified by runtime smoke 2026-06-02), HTML selectors are kebab-case, event bindings use round brackets for `@Output()` events. Different shape entirely.
|
|
30
|
-
- **Native Android** — load `cometchat-android-v6-{compose,kotlin}-components` (V6) or `cometchat-android-v5-components` (V5). Different package namespaces (`com.cometchat.uikit.compose.*` vs `com.cometchat.chatuikit.*`) — never reuse React component names.
|
|
31
|
-
- **iOS V5** — load `cometchat-ios-components`. UIKit Swift surface; `CometChatConversations()` zero-arg initializer + `.set(group: ...)` pattern; nothing like the React prop API.
|
|
32
|
-
- **Flutter V5 / V6** — load `cometchat-flutter-{v5,v6}-components`. Dart widget API with named parameters; V5 GetX vs V6 Bloc state-management split changes lifecycle.
|
|
33
|
-
- **Theming-only tasks** — load `cometchat-theming` (CSS variables, recipes) for color/font customization without component changes.
|
|
34
|
-
- **SDK-only chat (no UI Kit)** — this catalog assumes UI Kit components. If a future skill ships for the pure-SDK path (no `<CometChat*>` JSX), defer to it; today the closest analog is the SDK-only patterns inside `cometchat-react-calls` §4c.
|
|
35
|
-
|
|
36
|
-
### Importing `CometChat.User` / `CometChat.Group` / etc.
|
|
37
|
-
|
|
38
|
-
`CometChat.User`, `CometChat.Group`, `CometChat.BaseMessage`, `CometChat.Conversation`, `CometChat.GroupMember`, `CometChat.TextMessage` are **classes** (runtime values), not pure types. That means the import strategy depends on how you use them:
|
|
39
|
-
|
|
40
|
-
**Pattern A — you call the class as a value or use it with `instanceof`.** Use a plain value import:
|
|
41
|
-
|
|
42
|
-
```tsx
|
|
43
|
-
import { CometChat } from "@cometchat/chat-sdk-javascript";
|
|
44
|
-
|
|
45
|
-
if (entity instanceof CometChat.User) { ... }
|
|
46
|
-
const user = await CometChat.getUser(uid);
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**Pattern B — you use it only as a type annotation, nowhere else.** Two options:
|
|
50
|
-
|
|
51
|
-
```tsx
|
|
52
|
-
// Option 1: value import, reference the type via the namespace — TS lets this slide
|
|
53
|
-
// because CometChat is a class-namespace
|
|
54
|
-
import { CometChat } from "@cometchat/chat-sdk-javascript";
|
|
55
|
-
function renderHeader(user: CometChat.User) { ... }
|
|
56
|
-
|
|
57
|
-
// Option 2: explicit type-only import
|
|
58
|
-
import type { CometChat } from "@cometchat/chat-sdk-javascript";
|
|
59
|
-
function renderHeader(user: CometChat.User) { ... }
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
**Do NOT mix these.** If you write `import type { CometChat }` and then try `entity instanceof CometChat.User`, TypeScript strips the import at compile time and the code throws at runtime. If you write `import { CometChat }` but only reference `CometChat.User` as a type, `noUnusedLocals` can flag it (TS6133).
|
|
63
|
-
|
|
64
|
-
**Safest default:** use the plain value import (`import { CometChat }`). It always works; the TS6133 warning only fires in strict `noUnusedLocals` configs and can be fixed by actually using the runtime value (e.g. `instanceof CometChat.User`) or by adding an `eslint-disable-next-line` if you truly only need the type.
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## 1. Core messaging
|
|
69
|
-
|
|
70
|
-
> ⛔ **STOP — only the components in THIS catalog exist. Do not invent or recall component names from v4/older memory.** Before emitting ANY `CometChat*` component, confirm it appears in this catalog (or the kit's exports). If it's not here, it does not exist — using it produces an **unresolved-import build failure** or a blank screen. This is the #1 failure class on this skill.
|
|
71
|
-
>
|
|
72
|
-
> **The real v6 component set (the ONLY ones — `import { … } from "@cometchat/chat-uikit-react"`):** `CometChatConversations`, `CometChatMessageHeader`, `CometChatMessageList`, `CometChatMessageComposer` (+ `CometChatCompactMessageComposer`), `CometChatUsers`, `CometChatGroups`, `CometChatMessageInformation` (+ the calling/feature components in their own catalogs).
|
|
73
|
-
>
|
|
74
|
-
> **Commonly hallucinated names that were REMOVED in v6 (verified absent from the kit exports) — do NOT use:** the all-in-one composites `CometChatConversationsWithMessages`, `CometChatUsersWithMessages`, `CometChatGroupsWithMessages`, the `CometChatMessages` composite, and the `CometChatUI` god-component. **There is no single "conversations + messages" component in v6** — you compose the two panes yourself (recipe below). (Note: `CometChatMessages`/`CometChatConversationsWithMessages` DO still exist in the Flutter v6 kit — this removal is web/RN/Angular. Always check the per-family catalog.)
|
|
75
|
-
|
|
76
|
-
> **The canonical two-pane experience (what "CometChatConversationsWithMessages" used to do — now hand-composed):**
|
|
77
|
-
> ```tsx
|
|
78
|
-
> const [active, setActive] = useState<CometChat.Conversation | null>(null);
|
|
79
|
-
> // pick the peer the message views need from the selected conversation:
|
|
80
|
-
> const peer = active?.getConversationWith(); // CometChat.User | CometChat.Group
|
|
81
|
-
> return (
|
|
82
|
-
> <div style={{ display: "flex", height: "100%" }}>
|
|
83
|
-
> <div style={{ width: 320 }}>
|
|
84
|
-
> <CometChatConversations activeConversation={active ?? undefined}
|
|
85
|
-
> onItemClick={(c) => setActive(c)} />
|
|
86
|
-
> </div>
|
|
87
|
-
> <div style={{ flex: 1, display: "flex", flexDirection: "column" }}>
|
|
88
|
-
> {peer && <>
|
|
89
|
-
> <CometChatMessageHeader {...(peer instanceof CometChat.User ? { user: peer } : { group: peer })} />
|
|
90
|
-
> <CometChatMessageList {...(peer instanceof CometChat.User ? { user: peer } : { group: peer })} />
|
|
91
|
-
> <CometChatMessageComposer {...(peer instanceof CometChat.User ? { user: peer } : { group: peer })} />
|
|
92
|
-
> </>}
|
|
93
|
-
> </div>
|
|
94
|
-
> </div>
|
|
95
|
-
> );
|
|
96
|
-
> ```
|
|
97
|
-
> A `CometChatMessageHeader`/`List`/`Composer` takes EITHER `user=` OR `group=` (never both) — derive it from the clicked conversation. Conversations-list-only and single-conversation-only are both valid subsets of this.
|
|
98
|
-
|
|
99
|
-
These are the components you use to build a chat experience. Most integrations use some combination of these seven.
|
|
100
|
-
|
|
101
|
-
### CometChatConversations
|
|
102
|
-
|
|
103
|
-
Renders a scrollable list of the logged-in user's conversations (both 1:1 and group).
|
|
104
|
-
|
|
105
|
-
**Key props:**
|
|
106
|
-
| Prop | Type | Description |
|
|
107
|
-
|---|---|---|
|
|
108
|
-
| `activeConversation` | `CometChat.Conversation` | Highlights the currently selected conversation |
|
|
109
|
-
| `onItemClick` | `(conversation: CometChat.Conversation) => void` | Called when the user taps a conversation |
|
|
110
|
-
| `showSearchBar` | `boolean` | Shows a basic name-filter search bar above the list |
|
|
111
|
-
| `onSearchBarClicked` | `() => void` | Called when the search bar is clicked (use to swap in `CometChatSearch` for full search) |
|
|
112
|
-
| `conversationsRequestBuilder` | `CometChat.ConversationsRequestBuilder` | Customize which conversations to fetch (filters, limits) |
|
|
113
|
-
|
|
114
|
-
**Usage:**
|
|
115
|
-
```tsx
|
|
116
|
-
<CometChatConversations
|
|
117
|
-
activeConversation={activeConversation}
|
|
118
|
-
onItemClick={(conversation) => setActiveConversation(conversation)}
|
|
119
|
-
/>
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
**Works with:** CometChatMessageHeader, CometChatMessageList, CometChatMessageComposer (two-pane layout)
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
### CometChatMessageList
|
|
127
|
-
|
|
128
|
-
Renders messages for a specific user or group conversation. Supports threaded views via `parentMessageId`.
|
|
129
|
-
|
|
130
|
-
**Key props:**
|
|
131
|
-
| Prop | Type | Description |
|
|
132
|
-
|---|---|---|
|
|
133
|
-
| `user` | `CometChat.User` | Show messages with this user (mutually exclusive with `group`) |
|
|
134
|
-
| `group` | `CometChat.Group` | Show messages in this group (mutually exclusive with `user`) |
|
|
135
|
-
| `parentMessageId` | `number` | If set, shows only replies to this message (thread view) |
|
|
136
|
-
| `templates` | `CometChatMessageTemplate[]` | Custom message bubble templates |
|
|
137
|
-
| `messagesRequestBuilder` | `CometChat.MessagesRequestBuilder` | Customize message fetching |
|
|
138
|
-
|
|
139
|
-
**Usage:**
|
|
140
|
-
```tsx
|
|
141
|
-
<CometChatMessageList user={selectedUser} />
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
**Works with:** CometChatMessageHeader (above), CometChatMessageComposer (below)
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
### CometChatMessageComposer
|
|
149
|
-
|
|
150
|
-
A text input with send button, attachment options, and emoji support. Sends messages to the specified user or group.
|
|
151
|
-
|
|
152
|
-
**Key props:**
|
|
153
|
-
| Prop | Type | Description |
|
|
154
|
-
|---|---|---|
|
|
155
|
-
| `user` | `CometChat.User` | Send messages to this user (mutually exclusive with `group`) |
|
|
156
|
-
| `group` | `CometChat.Group` | Send messages to this group (mutually exclusive with `user`) |
|
|
157
|
-
| `parentMessageId` | `number` | If set, sends replies to this message (thread mode) |
|
|
158
|
-
| `onSendButtonClick` | `(message: CometChat.BaseMessage) => void` | Called when send is clicked |
|
|
159
|
-
|
|
160
|
-
**Usage:**
|
|
161
|
-
```tsx
|
|
162
|
-
<CometChatMessageComposer user={selectedUser} />
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
**Works with:** CometChatMessageList (above), CometChatMessageHeader (at top of message area)
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
### CometChatCompactMessageComposer
|
|
170
|
-
|
|
171
|
-
A rich-text variant of the message composer with formatting toolbar (bold, italic, code, etc.). Same props as CometChatMessageComposer.
|
|
172
|
-
|
|
173
|
-
**Prefer this for new integrations.** The v6 sample app uses `CometChatCompactMessageComposer` everywhere — rich-text formatting is the modern default. Both work; reach for `CometChatMessageComposer` (the basic variant) only if you have a specific reason to skip the formatting toolbar (e.g., a stripped-down marketplace ping where plain text is the entire UX).
|
|
174
|
-
|
|
175
|
-
**Key props:**
|
|
176
|
-
| Prop | Type | Description |
|
|
177
|
-
|---|---|---|
|
|
178
|
-
| `user` | `CometChat.User` | Send messages to this user |
|
|
179
|
-
| `group` | `CometChat.Group` | Send messages to this group |
|
|
180
|
-
| `parentMessageId` | `number` | Thread mode |
|
|
181
|
-
| `onSendButtonClick` | `(message: CometChat.BaseMessage) => void` | Called on send |
|
|
182
|
-
|
|
183
|
-
**Usage:**
|
|
184
|
-
```tsx
|
|
185
|
-
<CometChatCompactMessageComposer user={selectedUser} />
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
**Works with:** Same as CometChatMessageComposer -- drop-in replacement for rich text
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
### CometChatMessageHeader
|
|
193
|
-
|
|
194
|
-
Displays the name, avatar, and status of the user or group at the top of a message view. Supports a menu slot and search.
|
|
195
|
-
|
|
196
|
-
**Key props:**
|
|
197
|
-
| Prop | Type | Description |
|
|
198
|
-
|---|---|---|
|
|
199
|
-
| `user` | `CometChat.User` | Show header for this user |
|
|
200
|
-
| `group` | `CometChat.Group` | Show header for this group |
|
|
201
|
-
| `onItemClick` | `() => void` | Called when the header info area is clicked (use to open details panel) |
|
|
202
|
-
| `onBack` | `() => void` | Called when back button is clicked |
|
|
203
|
-
| `auxiliaryButtonView` | `JSX.Element` | Custom button area (e.g., CometChatCallButtons) |
|
|
204
|
-
| `showBackButton` | `boolean` | Show a back button (for mobile/nested views) |
|
|
205
|
-
| `showSearchOption` | `boolean` | Show a search icon in the header |
|
|
206
|
-
| `onSearchOptionClicked` | `() => void` | Called when search icon is clicked |
|
|
207
|
-
| `hideVideoCallButton` | `boolean` | Hide the video call button |
|
|
208
|
-
| `hideVoiceCallButton` | `boolean` | Hide the voice call button |
|
|
209
|
-
|
|
210
|
-
**Usage:**
|
|
211
|
-
```tsx
|
|
212
|
-
<CometChatMessageHeader
|
|
213
|
-
user={selectedUser}
|
|
214
|
-
onItemClick={() => setShowDetails(true)}
|
|
215
|
-
auxiliaryButtonView={<CometChatCallButtons user={selectedUser} />}
|
|
216
|
-
/>
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
**Works with:** CometChatMessageList (below), CometChatCallButtons (in auxiliaryButtonView slot)
|
|
220
|
-
|
|
221
|
-
> ⚠️ **Header `onItemClick` has NO default behavior (ENG-35705).** The kit ships no built-in `<CometChatUserDetails />` / `<CometChatGroupDetails />` panel — clicking the header name/avatar produces zero visible feedback unless YOU pass an `onItemClick` callback. **Four testers flagged this as "kit feels broken."** Rule when emitting `<CometChatMessageHeader>`:
|
|
222
|
-
> 1. Either provide an `onItemClick` that opens a details panel YOU built (use the sample-app reference at `sample-app/src/components/CometChatDetails/`), OR
|
|
223
|
-
> 2. Wrap the header in a clickable region that goes elsewhere, so the avatar+name doesn't *look* like a dead end. (There is no `showInfo` prop on `CometChatMessageHeader` — don't emit it.)
|
|
224
|
-
> Do NOT mount the header bare without an `onItemClick` — it's a customer-facing dead end.
|
|
225
|
-
|
|
226
|
-
> ⚠️ **`Reply in Thread` action requires the host to wire the thread panel (ENG-35705 — clarified 2026-06-02 from "broken" to "requires wiring").** The kit's `<CometChatMessageList>` renders a "Reply in Thread" item in the message-options menu and fires `onThreadRepliesClick(parentMessage)` when tapped — but the kit does NOT ship a default thread screen. If the host doesn't bind `onThreadRepliesClick` to a thread surface, the action visually does nothing (callback fires; no UI follows). Two paths:
|
|
227
|
-
>
|
|
228
|
-
> 1. **You're not building threads** — set `hideReplyInThreadOption={true}` on `<CometChatMessageList>` to remove the menu item entirely.
|
|
229
|
-
> 2. **You ARE building threads** — bind `onThreadRepliesClick={(parent) => /* open thread surface */}` and render a separate `<CometChatMessageList parentMessageId={parent.getId()} />` inside the thread surface. Sample app's pattern: `cometchat-uikit-react-v6/sample-app/src/components/CometChatMessages/CometChatMessages.tsx:74` wires this via parent component routing.
|
|
230
|
-
>
|
|
231
|
-
> The dispatcher hard rule still defaults to option 1 (hide threads) because most integrations don't want them. Restated here at point-of-use so the catalog reader makes a conscious choice.
|
|
232
|
-
|
|
233
|
-
> ⚠️ **`Message Privately` action — hide it via the kit prop if it misbehaves (ENG-35705).** In group chats the message-options menu shows a "Message Privately" item that may do nothing on click in some kit versions. `<CometChatMessageList>` exposes `hideMessagePrivatelyOption={true}` to remove it cleanly — set that rather than living with a dead menu item.
|
|
234
|
-
|
|
235
|
-
---
|
|
236
|
-
|
|
237
|
-
### CometChatSearch
|
|
238
|
-
|
|
239
|
-
Full-featured dual-scope search: searches across conversations AND messages with filter chips. This is the primary search component.
|
|
240
|
-
|
|
241
|
-
**Key props:**
|
|
242
|
-
| Prop | Type | Description |
|
|
243
|
-
|---|---|---|
|
|
244
|
-
| `onConversationClicked` | `(conversation: CometChat.Conversation) => void` | Called when a conversation result is clicked |
|
|
245
|
-
| `onMessageClicked` | `(message: CometChat.BaseMessage) => void` | Called when a message result is clicked |
|
|
246
|
-
|
|
247
|
-
**Usage:**
|
|
248
|
-
```tsx
|
|
249
|
-
<CometChatSearch
|
|
250
|
-
onConversationClicked={(conv) => navigateToConversation(conv)}
|
|
251
|
-
onMessageClicked={(msg) => scrollToMessage(msg)}
|
|
252
|
-
/>
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
**Works with:** CometChatConversations (replaces the list when search is active)
|
|
256
|
-
|
|
257
|
-
> **Hard rule — never roll your own search.** Any request involving
|
|
258
|
-
> "search", "find messages", "search conversations", or "search across
|
|
259
|
-
> conversations" MUST use `<CometChatSearch>` (or `showSearchBar={true}`
|
|
260
|
-
> + `onSearchBarClicked` on `CometChatConversations` to swap into
|
|
261
|
-
> `<CometChatSearch>` on click). Do NOT build custom `<input type="search">`
|
|
262
|
-
> bars, hand-rolled result lists, or filter UIs — they bypass the SDK's
|
|
263
|
-
> pagination, highlighting, and dual-scope (conversations + messages)
|
|
264
|
-
> matching that ship with the built-in component.
|
|
265
|
-
|
|
266
|
-
---
|
|
267
|
-
|
|
268
|
-
### CometChatThreadHeader
|
|
269
|
-
|
|
270
|
-
Header bar for a threaded message view. Shows the parent message and a close button.
|
|
271
|
-
|
|
272
|
-
**Key props:**
|
|
273
|
-
| Prop | Type | Description |
|
|
274
|
-
|---|---|---|
|
|
275
|
-
| `parentMessage` | `CometChat.BaseMessage` | The message that started the thread |
|
|
276
|
-
| `onClose` | `() => void` | Called when the user closes the thread view |
|
|
277
|
-
|
|
278
|
-
**Usage:**
|
|
279
|
-
```tsx
|
|
280
|
-
<CometChatThreadHeader
|
|
281
|
-
parentMessage={threadParentMessage}
|
|
282
|
-
onClose={() => setThreadParent(null)}
|
|
283
|
-
/>
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
**Works with:** CometChatMessageList (with `parentMessageId`), CometChatMessageComposer (with `parentMessageId`)
|
|
287
|
-
|
|
288
|
-
---
|
|
289
|
-
|
|
290
|
-
## 2. Lists and selection
|
|
291
|
-
|
|
292
|
-
Components for browsing and selecting users, groups, and group members.
|
|
293
|
-
|
|
294
|
-
### CometChatUsers
|
|
295
|
-
|
|
296
|
-
A scrollable list of users. Used for starting new conversations or browsing the user directory.
|
|
297
|
-
|
|
298
|
-
**Key props:**
|
|
299
|
-
| Prop | Type | Description |
|
|
300
|
-
|---|---|---|
|
|
301
|
-
| `onItemClick` | `(user: CometChat.User) => void` | Called when a user is selected |
|
|
302
|
-
| `usersRequestBuilder` | `CometChat.UsersRequestBuilder` | Customize which users to fetch |
|
|
303
|
-
|
|
304
|
-
**Usage:**
|
|
305
|
-
```tsx
|
|
306
|
-
<CometChatUsers onItemClick={(user) => startConversation(user)} />
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
**Works with:** CometChatMessageHeader, CometChatMessageList, CometChatMessageComposer (after selection)
|
|
310
|
-
|
|
311
|
-
---
|
|
312
|
-
|
|
313
|
-
### CometChatGroups
|
|
314
|
-
|
|
315
|
-
A scrollable list of groups. Used for browsing and joining groups.
|
|
316
|
-
|
|
317
|
-
**Key props:**
|
|
318
|
-
| Prop | Type | Description |
|
|
319
|
-
|---|---|---|
|
|
320
|
-
| `onItemClick` | `(group: CometChat.Group) => void` | Called when a group is selected |
|
|
321
|
-
| `groupsRequestBuilder` | `CometChat.GroupsRequestBuilder` | Customize which groups to fetch |
|
|
322
|
-
|
|
323
|
-
**Usage:**
|
|
324
|
-
```tsx
|
|
325
|
-
<CometChatGroups onItemClick={(group) => openGroup(group)} />
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
**Works with:** CometChatMessageHeader, CometChatMessageList, CometChatMessageComposer (after selection)
|
|
329
|
-
|
|
330
|
-
---
|
|
331
|
-
|
|
332
|
-
### CometChatGroupMembers
|
|
333
|
-
|
|
334
|
-
Displays members of a specific group with their roles (owner, admin, member).
|
|
335
|
-
|
|
336
|
-
**Key props:**
|
|
337
|
-
| Prop | Type | Description |
|
|
338
|
-
|---|---|---|
|
|
339
|
-
| `group` | `CometChat.Group` | The group whose members to display (required) |
|
|
340
|
-
| `onItemClick` | `(member: CometChat.GroupMember) => void` | Called when a member is selected |
|
|
341
|
-
|
|
342
|
-
**Usage:**
|
|
343
|
-
```tsx
|
|
344
|
-
<CometChatGroupMembers group={selectedGroup} />
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
**Works with:** Group details panel, CometChatGroups
|
|
348
|
-
|
|
349
|
-
---
|
|
350
|
-
|
|
351
|
-
### CometChatSearchBar
|
|
352
|
-
|
|
353
|
-
A standalone search input component. Used for filtering within other components.
|
|
354
|
-
|
|
355
|
-
**Key props:**
|
|
356
|
-
| Prop | Type | Description |
|
|
357
|
-
|---|---|---|
|
|
358
|
-
| `onChange` | `(input: { value?: string }) => void` | Called as the user types — read `input.value` |
|
|
359
|
-
| `searchText` | `string` | Controlled input value |
|
|
360
|
-
| `placeholderText` | `string` | Placeholder text |
|
|
361
|
-
|
|
362
|
-
**Usage:**
|
|
363
|
-
```tsx
|
|
364
|
-
<CometChatSearchBar onChange={(input) => filterUsers(input.value ?? "")} />
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
**Works with:** Any list component for client-side filtering
|
|
368
|
-
|
|
369
|
-
---
|
|
370
|
-
|
|
371
|
-
## 3. Calls
|
|
372
|
-
|
|
373
|
-
Components for voice and video calling.
|
|
374
|
-
|
|
375
|
-
### CometChatCallButtons
|
|
376
|
-
|
|
377
|
-
Renders voice and video call buttons. Typically placed in the `auxiliaryButtonView` prop of CometChatMessageHeader.
|
|
378
|
-
|
|
379
|
-
**Key props:**
|
|
380
|
-
| Prop | Type | Description |
|
|
381
|
-
|---|---|---|
|
|
382
|
-
| `user` | `CometChat.User` | Call this user |
|
|
383
|
-
| `group` | `CometChat.Group` | Call this group |
|
|
384
|
-
| `hideVideoCallButton` | `boolean` | Hide the video call button |
|
|
385
|
-
| `hideVoiceCallButton` | `boolean` | Hide the voice call button |
|
|
386
|
-
|
|
387
|
-
**Usage:**
|
|
388
|
-
```tsx
|
|
389
|
-
<CometChatCallButtons user={selectedUser} />
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
**Works with:** CometChatMessageHeader (via its `auxiliaryButtonView` prop — there is no `menu` prop), CometChatIncomingCall (at app root)
|
|
393
|
-
|
|
394
|
-
---
|
|
395
|
-
|
|
396
|
-
### CometChatIncomingCall
|
|
397
|
-
|
|
398
|
-
Renders an incoming call notification overlay. Mount this at the app root so it can show incoming calls from any screen.
|
|
399
|
-
|
|
400
|
-
**Key props:** None required -- it auto-listens for incoming call events.
|
|
401
|
-
|
|
402
|
-
**Usage:**
|
|
403
|
-
```tsx
|
|
404
|
-
// At your app root, always mounted:
|
|
405
|
-
<CometChatIncomingCall />
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
**Works with:** CometChatCallButtons (triggers outgoing calls that the other user sees as incoming)
|
|
409
|
-
|
|
410
|
-
---
|
|
411
|
-
|
|
412
|
-
### CometChatOutgoingCall
|
|
413
|
-
|
|
414
|
-
Renders the outgoing call screen (ringing state). Automatically shown when the user initiates a call.
|
|
415
|
-
|
|
416
|
-
**Key props:** None required -- auto-triggered by call initiation.
|
|
417
|
-
|
|
418
|
-
**Usage:**
|
|
419
|
-
```tsx
|
|
420
|
-
<CometChatOutgoingCall />
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
**Works with:** CometChatCallButtons
|
|
424
|
-
|
|
425
|
-
---
|
|
426
|
-
|
|
427
|
-
### CometChatOngoingCall
|
|
428
|
-
|
|
429
|
-
Renders the active call screen with video feeds, mute/unmute, and hang-up controls.
|
|
430
|
-
|
|
431
|
-
**Key props:** None required -- auto-triggered when a call connects.
|
|
432
|
-
|
|
433
|
-
**Usage:**
|
|
434
|
-
```tsx
|
|
435
|
-
<CometChatOngoingCall />
|
|
436
|
-
```
|
|
437
|
-
|
|
438
|
-
**Works with:** CometChatIncomingCall, CometChatOutgoingCall
|
|
439
|
-
|
|
440
|
-
---
|
|
441
|
-
|
|
442
|
-
### CometChatCallLogs
|
|
443
|
-
|
|
444
|
-
Displays a history of past voice and video calls.
|
|
445
|
-
|
|
446
|
-
**Key props:** None required for basic usage.
|
|
447
|
-
|
|
448
|
-
**Usage:**
|
|
449
|
-
```tsx
|
|
450
|
-
<CometChatCallLogs />
|
|
451
|
-
```
|
|
452
|
-
|
|
453
|
-
**Works with:** Tab-based layouts (as one of the tabs alongside Conversations, Users, Groups)
|
|
454
|
-
|
|
455
|
-
---
|
|
456
|
-
|
|
457
|
-
## 4. Interactions
|
|
458
|
-
|
|
459
|
-
Components for message reactions and emoji.
|
|
460
|
-
|
|
461
|
-
### CometChatReactions
|
|
462
|
-
|
|
463
|
-
Displays reaction badges on a message (e.g., thumbs-up x3). Automatically rendered inside message bubbles when reactions are enabled.
|
|
464
|
-
|
|
465
|
-
**Key props:** Typically used internally by the message list. Not usually instantiated directly.
|
|
466
|
-
|
|
467
|
-
---
|
|
468
|
-
|
|
469
|
-
### CometChatReactionList
|
|
470
|
-
|
|
471
|
-
Shows a detailed list of who reacted with what emoji on a specific message.
|
|
472
|
-
|
|
473
|
-
**Key props:** Used internally. Shown when the user clicks on a reaction badge.
|
|
474
|
-
|
|
475
|
-
---
|
|
476
|
-
|
|
477
|
-
## 5. Notifications (catalog gap closed 2026-06-02)
|
|
478
|
-
|
|
479
|
-
Three notification-related exports that were missing from this catalog before today. Verified against `cometchat-uikit-react-v6/src/index.ts:167-169`.
|
|
480
|
-
|
|
481
|
-
### CometChatNotificationFeed
|
|
482
|
-
|
|
483
|
-
A scrollable inbox of campaign / promotional notifications. Renders a list view; integrators wire it as a dropdown or dedicated route.
|
|
484
|
-
|
|
485
|
-
**Key props:** `onItemClick: (feedItem: NotificationFeedItem) => void` to handle taps; `notificationFeedRequestBuilder` (and `notificationCategoriesRequestBuilder`) to filter — NOT `notificationsRequestBuilder`.
|
|
486
|
-
|
|
487
|
-
**Usage:**
|
|
488
|
-
```tsx
|
|
489
|
-
import { CometChatNotificationFeed } from "@cometchat/chat-uikit-react";
|
|
490
|
-
|
|
491
|
-
// feedItem is a NotificationFeedItem (campaign notification) — it has no
|
|
492
|
-
// `conversationId`; route off its own fields / deep-link payload.
|
|
493
|
-
<CometChatNotificationFeed onItemClick={(feedItem) => handleNotification(feedItem)} />
|
|
494
|
-
```
|
|
495
|
-
|
|
496
|
-
---
|
|
497
|
-
|
|
498
|
-
### CometChatNotificationBadge
|
|
499
|
-
|
|
500
|
-
A small unread-count pill, designed to attach to a nav item / icon. Auto-updates as new notifications arrive via the kit's notification feed listener.
|
|
501
|
-
|
|
502
|
-
**Key props:** All optional — defaults to showing the current unread count of the logged-in user. Style with the standard `CometChat*Style` pattern.
|
|
503
|
-
|
|
504
|
-
**Usage:**
|
|
505
|
-
```tsx
|
|
506
|
-
import { CometChatNotificationBadge } from "@cometchat/chat-uikit-react";
|
|
507
|
-
|
|
508
|
-
<button onClick={openNotificationFeed}>
|
|
509
|
-
<BellIcon />
|
|
510
|
-
<CometChatNotificationBadge />
|
|
511
|
-
</button>
|
|
512
|
-
```
|
|
513
|
-
|
|
514
|
-
---
|
|
515
|
-
|
|
516
|
-
### useNotificationUnreadCount (hook)
|
|
517
|
-
|
|
518
|
-
React hook returning the current unread-notification count for the logged-in user. Use this when `<CometChatNotificationBadge />` doesn't fit your layout — gives you the raw number to render however you like.
|
|
519
|
-
|
|
520
|
-
**Signature:**
|
|
521
|
-
```tsx
|
|
522
|
-
import { useNotificationUnreadCount } from "@cometchat/chat-uikit-react";
|
|
523
|
-
|
|
524
|
-
const { count, isLoading } = useNotificationUnreadCount({ /* optional UseNotificationUnreadCountOptions */ });
|
|
525
|
-
```
|
|
526
|
-
|
|
527
|
-
Internally subscribes to the same notification stream as `CometChatNotificationBadge` — using both is safe (single shared source).
|
|
528
|
-
|
|
529
|
-
---
|
|
530
|
-
|
|
531
|
-
### CometChatEmojiKeyboard
|
|
532
|
-
|
|
533
|
-
A full emoji picker. Automatically rendered inside the message composer when the emoji button is clicked.
|
|
534
|
-
|
|
535
|
-
**Key props:** Used internally by CometChatMessageComposer. Not usually instantiated directly.
|
|
536
|
-
|
|
537
|
-
---
|
|
538
|
-
|
|
539
|
-
### CometChatReactionInfo
|
|
540
|
-
|
|
541
|
-
Tooltip or popover showing reaction details on hover.
|
|
542
|
-
|
|
543
|
-
**Key props:** Used internally by the message list. Not usually instantiated directly.
|
|
544
|
-
|
|
545
|
-
---
|
|
546
|
-
|
|
547
|
-
## 5. AI
|
|
548
|
-
|
|
549
|
-
AI-powered assistant components. These require AI features (Smart Chat Features) to be enabled in your CometChat dashboard at **Chat & Messaging → Features → Smart Chat Features**.
|
|
550
|
-
|
|
551
|
-
### CometChatAIAssistantChat
|
|
552
|
-
|
|
553
|
-
An AI chatbot interface that users can interact with for automated responses. Typically rendered inside a panel or modal triggered from the message header.
|
|
554
|
-
|
|
555
|
-
**Prerequisites:** Enable "Conversation Starter" and/or "Smart Replies" in the dashboard.
|
|
556
|
-
|
|
557
|
-
**Usage:** `user` is a **required** prop (the AI assistant user to chat with):
|
|
558
|
-
```tsx
|
|
559
|
-
<CometChatAIAssistantChat user={assistantUser} />
|
|
560
|
-
```
|
|
561
|
-
|
|
562
|
-
---
|
|
563
|
-
|
|
564
|
-
### CometChatAIAssistantChatHistory
|
|
565
|
-
|
|
566
|
-
Displays past AI assistant interactions. Used alongside `CometChatAIAssistantChat` to show conversation history with the AI.
|
|
567
|
-
|
|
568
|
-
**Usage:**
|
|
569
|
-
```tsx
|
|
570
|
-
<CometChatAIAssistantChatHistory />
|
|
571
|
-
```
|
|
572
|
-
|
|
573
|
-
---
|
|
574
|
-
|
|
575
|
-
### CometChatAIAssistantTools
|
|
576
|
-
|
|
577
|
-
⚠️ **This is a CLASS, not a renderable component.** You instantiate it with a map of action functions and pass it to `<CometChatAIAssistantChat>` via the `aiAssistantTools` prop — do NOT render `<CometChatAIAssistantTools />` (it's a type error).
|
|
578
|
-
|
|
579
|
-
**Prerequisites:** Enable "Conversation Summary" and/or other AI tools in the dashboard.
|
|
580
|
-
|
|
581
|
-
**Usage:**
|
|
582
|
-
```tsx
|
|
583
|
-
const toolkit = new CometChatAIAssistantTools({ /* actionsMap */ });
|
|
584
|
-
<CometChatAIAssistantChat user={assistantUser} aiAssistantTools={toolkit} />
|
|
585
|
-
```
|
|
586
|
-
|
|
587
|
-
> **Note:** For detailed props, configuration options, and customization of AI components, query the docs MCP — these components' APIs evolve with CometChat's AI feature releases.
|
|
588
|
-
|
|
589
|
-
### CometChatStreamMessageBubble
|
|
590
|
-
|
|
591
|
-
Renders a streaming AI message with a typing animation effect. Used internally by AI assistant features.
|
|
592
|
-
|
|
593
|
-
### CometChatAIAssistantMessageBubble
|
|
594
|
-
|
|
595
|
-
Renders AI assistant response bubbles with special formatting. Used internally by AI features.
|
|
596
|
-
|
|
597
|
-
---
|
|
598
|
-
|
|
599
|
-
## 5b. Moderation and utility components
|
|
600
|
-
|
|
601
|
-
These are exported but typically rendered internally by the kit. You may need them for advanced customization.
|
|
602
|
-
|
|
603
|
-
### CometChatFlagMessageDialog
|
|
604
|
-
|
|
605
|
-
A dialog for reporting/flagging messages. Rendered internally when a user reports a message.
|
|
606
|
-
|
|
607
|
-
### CometChatMessageInformation
|
|
608
|
-
|
|
609
|
-
Shows message delivery and read receipt details (who received, who read, timestamps). Useful for building a message info panel.
|
|
610
|
-
|
|
611
|
-
---
|
|
612
|
-
|
|
613
|
-
## 5c. Text formatters
|
|
614
|
-
|
|
615
|
-
These are not React components — they are formatter classes that customize how text is rendered in message bubbles. Pass them via the `textFormatters` prop on `CometChatMessageList`.
|
|
616
|
-
|
|
617
|
-
| Formatter | Purpose |
|
|
618
|
-
|---|---|
|
|
619
|
-
| `CometChatTextFormatter` | Base class for custom formatters |
|
|
620
|
-
| `CometChatUrlsFormatter` | Auto-links URLs in messages |
|
|
621
|
-
| `CometChatMentionsFormatter` | Renders @mentions with styling + click handlers |
|
|
622
|
-
| `CometChatTextHighlightFormatter` | Highlights search terms in messages |
|
|
623
|
-
| `CometChatRichTextFormatter` | Renders rich text (bold, italic, etc.) |
|
|
624
|
-
| `CometChatMarkdownFormatter` | Renders markdown syntax in messages |
|
|
625
|
-
|
|
626
|
-
All imported from `@cometchat/chat-uikit-react`. To customize text rendering, create a class extending `CometChatTextFormatter` and pass it in the `textFormatters` array.
|
|
627
|
-
|
|
628
|
-
---
|
|
629
|
-
|
|
630
|
-
## 6. Infrastructure
|
|
631
|
-
|
|
632
|
-
These are not visual components -- they handle initialization, login state, and configuration.
|
|
633
|
-
|
|
634
|
-
### CometChatUIKit
|
|
635
|
-
|
|
636
|
-
The main entry point for initialization and authentication. This is a static class, not a React component.
|
|
637
|
-
|
|
638
|
-
**Key methods:**
|
|
639
|
-
| Method | Description |
|
|
640
|
-
|---|---|
|
|
641
|
-
| `CometChatUIKit.init(settings)` | Initialize the SDK. Returns a Promise. Must be called once before any component renders. |
|
|
642
|
-
| `CometChatUIKit.login(uid)` | Log in with a user ID (dev mode). Returns `Promise<CometChat.User>`. Safe to call after a prior login completes (no-op), but **not concurrently** — two overlapping calls throw *"Please wait until the previous login request ends."* Use `cometchat-core`'s `ensureLoggedIn` helper to dedupe. |
|
|
643
|
-
| `CometChatUIKit.loginWithAuthToken(token)` | Log in with an auth token (production). Returns `Promise<CometChat.User>`. |
|
|
644
|
-
| `CometChatUIKit.getLoggedinUser()` | Get the currently logged-in user. Returns `Promise<CometChat.User \| null>`. |
|
|
645
|
-
| `CometChatUIKit.logout()` | Log out the current user. Returns a Promise. |
|
|
646
|
-
| `CometChatUIKit.createUser(user)` | Create a CometChat user (requires Auth Key). For server-side user management, see `cometchat-production`. |
|
|
647
|
-
| `CometChatUIKit.updateUser(user)` | Update a CometChat user (requires Auth Key). |
|
|
648
|
-
| `CometChatUIKit.isInitialized()` | Returns `boolean` — whether `init()` has been called. |
|
|
649
|
-
|
|
650
|
-
**Usage** (bare-API illustration — in real code, wrap `login` in an
|
|
651
|
-
in-flight guard so React StrictMode doesn't fire it twice; see
|
|
652
|
-
`cometchat-core` § 2 for the `ensureLoggedIn` helper):
|
|
653
|
-
```typescript
|
|
654
|
-
import { CometChatUIKit } from "@cometchat/chat-uikit-react";
|
|
655
|
-
|
|
656
|
-
await CometChatUIKit.init(settings);
|
|
657
|
-
await CometChatUIKit.login("cometchat-uid-1");
|
|
658
|
-
```
|
|
659
|
-
|
|
660
|
-
---
|
|
661
|
-
|
|
662
|
-
### CometChatUIKitLoginListener
|
|
663
|
-
|
|
664
|
-
Tracks the logged-in user synchronously. Unlike `CometChatUIKit.getLoggedinUser()` (which is async/Promise-based), this provides **synchronous** access to the current user — useful for guards and conditional rendering.
|
|
665
|
-
|
|
666
|
-
**Key methods:**
|
|
667
|
-
| Method | Description |
|
|
668
|
-
|---|---|
|
|
669
|
-
| `CometChatUIKitLoginListener.getLoggedInUser()` | Returns the currently logged-in `CometChat.User` synchronously, or `null` |
|
|
670
|
-
|
|
671
|
-
**When to use which:**
|
|
672
|
-
- `CometChatUIKit.getLoggedinUser()` — async, returns a Promise. Use in `useEffect` or async functions.
|
|
673
|
-
- `CometChatUIKitLoginListener.getLoggedInUser()` — synchronous. Use for immediate checks (e.g., redirect if not logged in, guard a route).
|
|
674
|
-
|
|
675
|
-
---
|
|
676
|
-
|
|
677
|
-
### UIKitSettingsBuilder
|
|
678
|
-
|
|
679
|
-
Builder class for creating the settings object passed to `CometChatUIKit.init()`.
|
|
680
|
-
|
|
681
|
-
**Key methods:**
|
|
682
|
-
| Method | Description |
|
|
683
|
-
|---|---|
|
|
684
|
-
| `.setAppId(appId: string)` | Set the CometChat app ID (required) |
|
|
685
|
-
| `.setRegion(region: string)` | Set the region: `"us"`, `"eu"`, or `"in"` (required) |
|
|
686
|
-
| `.setAuthKey(authKey: string)` | Set the auth key (required for `login(uid)` in dev mode) |
|
|
687
|
-
| `.subscribePresenceForAllUsers()` | Enable presence (online/offline) for all users |
|
|
688
|
-
| `.subscribePresenceForFriends()` | Enable presence only for friends list |
|
|
689
|
-
| `.subscribePresenceForRoles(roles)` | Enable presence for specific user roles |
|
|
690
|
-
| `.setAutoEstablishSocketConnection(bool)` | Control WebSocket auto-connect (default: true) |
|
|
691
|
-
| `.setAdminHost(host)` | Override admin URL (dedicated deployments only) |
|
|
692
|
-
| `.setClientHost(host)` | Override client URL (dedicated deployments only) |
|
|
693
|
-
| `.build()` | Returns the settings object |
|
|
694
|
-
|
|
695
|
-
**Usage:**
|
|
696
|
-
```typescript
|
|
697
|
-
import { UIKitSettingsBuilder } from "@cometchat/chat-uikit-react";
|
|
698
|
-
|
|
699
|
-
const settings = new UIKitSettingsBuilder()
|
|
700
|
-
.setAppId("your-app-id")
|
|
701
|
-
.setRegion("us")
|
|
702
|
-
.setAuthKey("your-auth-key")
|
|
703
|
-
.subscribePresenceForAllUsers()
|
|
704
|
-
.build();
|
|
705
|
-
```
|
|
706
|
-
|
|
707
|
-
---
|
|
708
|
-
|
|
709
|
-
## Composition patterns
|
|
710
|
-
|
|
711
|
-
These are the standard ways to combine CometChat components into complete
|
|
712
|
-
experiences. Use these as starting points, then customize with props.
|
|
713
|
-
|
|
714
|
-
> **Composer note:** Both `CometChatMessageComposer` and
|
|
715
|
-
> `CometChatCompactMessageComposer` exist. The compact variant includes
|
|
716
|
-
> rich text editing by default. The sample app uses the compact variant
|
|
717
|
-
> everywhere. Use whichever fits — the props are identical.
|
|
718
|
-
|
|
719
|
-
### Multi-conversation (two-pane)
|
|
720
|
-
|
|
721
|
-
The most common pattern. A conversation list on the left, message view on the right.
|
|
722
|
-
|
|
723
|
-
**Key details from the v6 sample app:**
|
|
724
|
-
- Store the full `CometChat.Conversation` object (not just user/group) — you need it for `activeConversation` highlighting and conversation-level operations
|
|
725
|
-
- Pass `activeConversation` to `CometChatConversations` so the selected item is visually highlighted
|
|
726
|
-
- Derive user/group from the conversation at render time using `getConversationWith()`
|
|
727
|
-
|
|
728
|
-
```tsx
|
|
729
|
-
import { useState } from "react";
|
|
730
|
-
import {
|
|
731
|
-
CometChatConversations,
|
|
732
|
-
CometChatMessageHeader,
|
|
733
|
-
CometChatMessageList,
|
|
734
|
-
CometChatCompactMessageComposer,
|
|
735
|
-
} from "@cometchat/chat-uikit-react";
|
|
736
|
-
import { CometChat } from "@cometchat/chat-sdk-javascript";
|
|
737
|
-
|
|
738
|
-
// The message list must scroll inside a flex column without pushing the
|
|
739
|
-
// composer off-screen. Mirror the sample app's list wrapper.
|
|
740
|
-
// .cc-msg-list { flex: 1 1 0; min-height: 0; overflow: hidden; }
|
|
741
|
-
// .cc-msg-list > .cometchat { height: 100%; overflow: hidden; }
|
|
742
|
-
|
|
743
|
-
function MultiConversation() {
|
|
744
|
-
const [activeConversation, setActiveConversation] = useState<CometChat.Conversation>();
|
|
745
|
-
|
|
746
|
-
// Derive user/group from the active conversation
|
|
747
|
-
const entity = activeConversation?.getConversationWith();
|
|
748
|
-
const selectedUser = entity instanceof CometChat.User ? entity : undefined;
|
|
749
|
-
const selectedGroup = entity instanceof CometChat.Group ? entity : undefined;
|
|
750
|
-
|
|
751
|
-
return (
|
|
752
|
-
<div style={{ display: "flex", height: "100vh" }}>
|
|
753
|
-
<div style={{ width: "360px", borderRight: "1px solid #eee" }}>
|
|
754
|
-
<CometChatConversations
|
|
755
|
-
activeConversation={activeConversation}
|
|
756
|
-
onItemClick={(conv) => setActiveConversation(conv)}
|
|
757
|
-
/>
|
|
758
|
-
</div>
|
|
759
|
-
<div style={{ flex: 1, display: "flex", flexDirection: "column" }}>
|
|
760
|
-
{selectedUser && (
|
|
761
|
-
<>
|
|
762
|
-
<CometChatMessageHeader user={selectedUser} />
|
|
763
|
-
<div className="cc-msg-list">
|
|
764
|
-
<CometChatMessageList user={selectedUser} />
|
|
765
|
-
</div>
|
|
766
|
-
<CometChatCompactMessageComposer user={selectedUser} />
|
|
767
|
-
</>
|
|
768
|
-
)}
|
|
769
|
-
{selectedGroup && (
|
|
770
|
-
<>
|
|
771
|
-
<CometChatMessageHeader group={selectedGroup} />
|
|
772
|
-
<div className="cc-msg-list">
|
|
773
|
-
<CometChatMessageList group={selectedGroup} />
|
|
774
|
-
</div>
|
|
775
|
-
<CometChatCompactMessageComposer group={selectedGroup} />
|
|
776
|
-
</>
|
|
777
|
-
)}
|
|
778
|
-
</div>
|
|
779
|
-
</div>
|
|
780
|
-
);
|
|
781
|
-
}
|
|
782
|
-
```
|
|
783
|
-
|
|
784
|
-
---
|
|
785
|
-
|
|
786
|
-
### Single thread
|
|
787
|
-
|
|
788
|
-
One chat window for a known user or group. No conversation list.
|
|
789
|
-
|
|
790
|
-
```tsx
|
|
791
|
-
import {
|
|
792
|
-
CometChatMessageHeader,
|
|
793
|
-
CometChatMessageList,
|
|
794
|
-
CometChatCompactMessageComposer,
|
|
795
|
-
} from "@cometchat/chat-uikit-react";
|
|
796
|
-
import { CometChat } from "@cometchat/chat-sdk-javascript";
|
|
797
|
-
|
|
798
|
-
interface SingleThreadProps {
|
|
799
|
-
user?: CometChat.User;
|
|
800
|
-
group?: CometChat.Group;
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
// .cc-msg-list { flex: 1 1 0; min-height: 0; overflow: hidden; }
|
|
804
|
-
// .cc-msg-list > .cometchat { height: 100%; overflow: hidden; }
|
|
805
|
-
|
|
806
|
-
function SingleThread({ user, group }: SingleThreadProps) {
|
|
807
|
-
return (
|
|
808
|
-
<div style={{ display: "flex", flexDirection: "column", height: "100%" }}>
|
|
809
|
-
{user && <CometChatMessageHeader user={user} />}
|
|
810
|
-
{group && <CometChatMessageHeader group={group} />}
|
|
811
|
-
<div className="cc-msg-list">
|
|
812
|
-
{user && <CometChatMessageList user={user} />}
|
|
813
|
-
{group && <CometChatMessageList group={group} />}
|
|
814
|
-
</div>
|
|
815
|
-
{user && <CometChatCompactMessageComposer user={user} />}
|
|
816
|
-
{group && <CometChatCompactMessageComposer group={group} />}
|
|
817
|
-
</div>
|
|
818
|
-
);
|
|
819
|
-
}
|
|
820
|
-
```
|
|
821
|
-
|
|
822
|
-
To target a specific user, resolve them first:
|
|
823
|
-
|
|
824
|
-
```tsx
|
|
825
|
-
const [targetUser, setTargetUser] = useState<CometChat.User>();
|
|
826
|
-
|
|
827
|
-
useEffect(() => {
|
|
828
|
-
CometChat.getUser("seller-uid-123").then(setTargetUser);
|
|
829
|
-
}, []);
|
|
830
|
-
|
|
831
|
-
if (!targetUser) return null;
|
|
832
|
-
return <SingleThread user={targetUser} />;
|
|
833
|
-
```
|
|
834
|
-
|
|
835
|
-
---
|
|
836
|
-
|
|
837
|
-
### Full messenger (tab-based)
|
|
838
|
-
|
|
839
|
-
A tab bar with Chats, Calls, Users, and Groups. Users can browse, start conversations, and make calls.
|
|
840
|
-
|
|
841
|
-
```tsx
|
|
842
|
-
import { useState } from "react";
|
|
843
|
-
import {
|
|
844
|
-
CometChatConversations,
|
|
845
|
-
CometChatCallLogs,
|
|
846
|
-
CometChatUsers,
|
|
847
|
-
CometChatGroups,
|
|
848
|
-
CometChatMessageHeader,
|
|
849
|
-
CometChatMessageList,
|
|
850
|
-
CometChatCompactMessageComposer,
|
|
851
|
-
} from "@cometchat/chat-uikit-react";
|
|
852
|
-
import { CometChat } from "@cometchat/chat-sdk-javascript";
|
|
853
|
-
|
|
854
|
-
// .cc-msg-list { flex: 1 1 0; min-height: 0; overflow: hidden; }
|
|
855
|
-
// .cc-msg-list > .cometchat { height: 100%; overflow: hidden; }
|
|
856
|
-
|
|
857
|
-
type Tab = "chats" | "calls" | "users" | "groups";
|
|
858
|
-
|
|
859
|
-
function FullMessenger() {
|
|
860
|
-
const [activeTab, setActiveTab] = useState<Tab>("chats");
|
|
861
|
-
const [activeConversation, setActiveConversation] = useState<CometChat.Conversation>();
|
|
862
|
-
const [selectedUser, setSelectedUser] = useState<CometChat.User>();
|
|
863
|
-
const [selectedGroup, setSelectedGroup] = useState<CometChat.Group>();
|
|
864
|
-
|
|
865
|
-
function selectUser(user: CometChat.User) {
|
|
866
|
-
setSelectedUser(user);
|
|
867
|
-
setSelectedGroup(undefined);
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
function selectGroup(group: CometChat.Group) {
|
|
871
|
-
setSelectedUser(undefined);
|
|
872
|
-
setSelectedGroup(group);
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
return (
|
|
876
|
-
<div style={{ display: "flex", height: "100vh" }}>
|
|
877
|
-
<div style={{ width: "360px", display: "flex", flexDirection: "column" }}>
|
|
878
|
-
{/* Tab content */}
|
|
879
|
-
<div style={{ flex: 1 }}>
|
|
880
|
-
{activeTab === "chats" && (
|
|
881
|
-
<CometChatConversations
|
|
882
|
-
activeConversation={activeConversation}
|
|
883
|
-
onItemClick={(conv) => {
|
|
884
|
-
setActiveConversation(conv);
|
|
885
|
-
const entity = conv.getConversationWith();
|
|
886
|
-
if (entity instanceof CometChat.User) selectUser(entity);
|
|
887
|
-
else if (entity instanceof CometChat.Group) selectGroup(entity);
|
|
888
|
-
}}
|
|
889
|
-
/>
|
|
890
|
-
)}
|
|
891
|
-
{activeTab === "calls" && (
|
|
892
|
-
<CometChatCallLogs
|
|
893
|
-
onItemClick={(call) => {
|
|
894
|
-
// Call log items show call details, not a message view.
|
|
895
|
-
// Use the call's participants to start a new call or
|
|
896
|
-
// navigate to the conversation.
|
|
897
|
-
}}
|
|
898
|
-
/>
|
|
899
|
-
)}
|
|
900
|
-
{activeTab === "users" && (
|
|
901
|
-
<CometChatUsers
|
|
902
|
-
activeUser={selectedUser}
|
|
903
|
-
onItemClick={selectUser}
|
|
904
|
-
/>
|
|
905
|
-
)}
|
|
906
|
-
{activeTab === "groups" && (
|
|
907
|
-
<CometChatGroups
|
|
908
|
-
activeGroup={selectedGroup}
|
|
909
|
-
onItemClick={selectGroup}
|
|
910
|
-
/>
|
|
911
|
-
)}
|
|
912
|
-
</div>
|
|
913
|
-
{/* Tab bar at the bottom */}
|
|
914
|
-
<div style={{ display: "flex", borderTop: "1px solid #eee" }}>
|
|
915
|
-
{(["chats", "calls", "users", "groups"] as Tab[]).map((tab) => (
|
|
916
|
-
<button
|
|
917
|
-
key={tab}
|
|
918
|
-
onClick={() => setActiveTab(tab)}
|
|
919
|
-
style={{ flex: 1, padding: 12, fontWeight: activeTab === tab ? "bold" : "normal" }}
|
|
920
|
-
>
|
|
921
|
-
{tab.charAt(0).toUpperCase() + tab.slice(1)}
|
|
922
|
-
</button>
|
|
923
|
-
))}
|
|
924
|
-
</div>
|
|
925
|
-
</div>
|
|
926
|
-
<div style={{ flex: 1, display: "flex", flexDirection: "column" }}>
|
|
927
|
-
{selectedUser && (
|
|
928
|
-
<>
|
|
929
|
-
<CometChatMessageHeader user={selectedUser} />
|
|
930
|
-
<div className="cc-msg-list">
|
|
931
|
-
<CometChatMessageList user={selectedUser} />
|
|
932
|
-
</div>
|
|
933
|
-
<CometChatCompactMessageComposer user={selectedUser} />
|
|
934
|
-
</>
|
|
935
|
-
)}
|
|
936
|
-
{selectedGroup && (
|
|
937
|
-
<>
|
|
938
|
-
<CometChatMessageHeader group={selectedGroup} />
|
|
939
|
-
<div className="cc-msg-list">
|
|
940
|
-
<CometChatMessageList group={selectedGroup} />
|
|
941
|
-
</div>
|
|
942
|
-
<CometChatCompactMessageComposer group={selectedGroup} />
|
|
943
|
-
</>
|
|
944
|
-
)}
|
|
945
|
-
</div>
|
|
946
|
-
</div>
|
|
947
|
-
);
|
|
948
|
-
}
|
|
949
|
-
```
|
|
950
|
-
|
|
951
|
-
---
|
|
952
|
-
|
|
953
|
-
### Threading
|
|
954
|
-
|
|
955
|
-
Threading is NOT automatic. The kit's **default** is `hideReplyInThreadOption={false}` — so a "Reply in Thread" entry shows up in every message's action menu out of the box, **even when the integrator hasn't wired a thread panel**. A user who clicks it sees nothing happen. That's why every `<CometChatMessageList>` in the `cometchat-placement` patterns uses `hideReplyInThreadOption` by default.
|
|
956
|
-
|
|
957
|
-
**To enable threading** in an experience that has room for a thread panel (typically a two-pane messenger or route-based chat — not a compact drawer or widget):
|
|
958
|
-
|
|
959
|
-
1. Remove the `hideReplyInThreadOption` prop from the main `CometChatMessageList`.
|
|
960
|
-
2. Wire `onThreadRepliesClick` to capture the thread message (pattern below).
|
|
961
|
-
3. Render the thread panel as a side panel or overlay. The thread panel has its OWN `CometChatMessageList` + `CometChatMessageComposer` scoped via `parentMessageId`.
|
|
962
|
-
|
|
963
|
-
Full pattern:
|
|
964
|
-
|
|
965
|
-
```tsx
|
|
966
|
-
import { useState } from "react";
|
|
967
|
-
import {
|
|
968
|
-
CometChatMessageList,
|
|
969
|
-
CometChatMessageComposer,
|
|
970
|
-
CometChatThreadHeader,
|
|
971
|
-
} from "@cometchat/chat-uikit-react";
|
|
972
|
-
import { CometChat } from "@cometchat/chat-sdk-javascript";
|
|
973
|
-
|
|
974
|
-
// 1. In your main message view, capture the thread click:
|
|
975
|
-
<CometChatMessageList
|
|
976
|
-
user={selectedUser}
|
|
977
|
-
onThreadRepliesClick={(message: CometChat.BaseMessage) => {
|
|
978
|
-
setThreadMessage(message);
|
|
979
|
-
setShowThread(true);
|
|
980
|
-
}}
|
|
981
|
-
/>
|
|
982
|
-
|
|
983
|
-
// 2. Render the thread panel as a side panel:
|
|
984
|
-
interface ThreadPanelProps {
|
|
985
|
-
parentMessage: CometChat.BaseMessage;
|
|
986
|
-
user?: CometChat.User;
|
|
987
|
-
group?: CometChat.Group;
|
|
988
|
-
onClose: () => void;
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
function ThreadPanel({ parentMessage, user, group, onClose }: ThreadPanelProps) {
|
|
992
|
-
const parentId = parentMessage.getId();
|
|
993
|
-
|
|
994
|
-
return (
|
|
995
|
-
<div style={{ width: "400px", display: "flex", flexDirection: "column", borderLeft: "1px solid #eee" }}>
|
|
996
|
-
<CometChatThreadHeader parentMessage={parentMessage} onClose={onClose} />
|
|
997
|
-
{user && <CometChatMessageList user={user} parentMessageId={parentId} />}
|
|
998
|
-
{group && <CometChatMessageList group={group} parentMessageId={parentId} />}
|
|
999
|
-
{user && <CometChatMessageComposer user={user} parentMessageId={parentId} />}
|
|
1000
|
-
{group && <CometChatMessageComposer group={group} parentMessageId={parentId} />}
|
|
1001
|
-
</div>
|
|
1002
|
-
);
|
|
1003
|
-
}
|
|
1004
|
-
```
|
|
1005
|
-
|
|
1006
|
-
**Key details:**
|
|
1007
|
-
- `onThreadRepliesClick` receives the full `CometChat.BaseMessage` (not just an ID)
|
|
1008
|
-
- `CometChatThreadHeader` shows the parent message content + close button
|
|
1009
|
-
- The scoped `CometChatMessageList` with `parentMessageId` shows only thread replies
|
|
1010
|
-
- The scoped `CometChatMessageComposer` with `parentMessageId` sends replies to the thread
|
|
1011
|
-
|
|
1012
|
-
---
|
|
1013
|
-
|
|
1014
|
-
### Search integration
|
|
1015
|
-
|
|
1016
|
-
Search overlays **alongside** the conversation list — it does NOT replace it. The conversations list stays mounted; search appears as a sibling panel.
|
|
1017
|
-
|
|
1018
|
-
**Global search (across all conversations):**
|
|
1019
|
-
|
|
1020
|
-
```tsx
|
|
1021
|
-
import { useState } from "react";
|
|
1022
|
-
import { CometChatConversations, CometChatSearch } from "@cometchat/chat-uikit-react";
|
|
1023
|
-
|
|
1024
|
-
function ConversationsWithSearch({ onSelectConversation }) {
|
|
1025
|
-
const [showSearch, setShowSearch] = useState(false);
|
|
1026
|
-
|
|
1027
|
-
return (
|
|
1028
|
-
<div style={{ position: "relative" }}>
|
|
1029
|
-
{/* Conversations always stay mounted */}
|
|
1030
|
-
<CometChatConversations
|
|
1031
|
-
showSearchBar={true}
|
|
1032
|
-
onSearchBarClicked={() => setShowSearch(true)}
|
|
1033
|
-
activeConversation={activeConversation}
|
|
1034
|
-
onItemClick={onSelectConversation}
|
|
1035
|
-
/>
|
|
1036
|
-
|
|
1037
|
-
{/* Search overlays on top when active */}
|
|
1038
|
-
{showSearch && (
|
|
1039
|
-
<div style={{ position: "absolute", inset: 0, zIndex: 10, background: "#fff" }}>
|
|
1040
|
-
<CometChatSearch
|
|
1041
|
-
onConversationClicked={(conv) => {
|
|
1042
|
-
setShowSearch(false);
|
|
1043
|
-
onSelectConversation(conv);
|
|
1044
|
-
}}
|
|
1045
|
-
onMessageClicked={(msg) => {
|
|
1046
|
-
setShowSearch(false);
|
|
1047
|
-
// navigate to the message's conversation
|
|
1048
|
-
}}
|
|
1049
|
-
/>
|
|
1050
|
-
</div>
|
|
1051
|
-
)}
|
|
1052
|
-
</div>
|
|
1053
|
-
);
|
|
1054
|
-
}
|
|
1055
|
-
```
|
|
1056
|
-
|
|
1057
|
-
**In-conversation search (within the active chat):**
|
|
1058
|
-
|
|
1059
|
-
```tsx
|
|
1060
|
-
// Add search button to the message header:
|
|
1061
|
-
<CometChatMessageHeader
|
|
1062
|
-
user={selectedUser}
|
|
1063
|
-
showSearchOption={true}
|
|
1064
|
-
onSearchOptionClicked={() => setShowMessageSearch(true)}
|
|
1065
|
-
/>
|
|
1066
|
-
|
|
1067
|
-
// Show CometChatSearch scoped to the current user/group:
|
|
1068
|
-
{showMessageSearch && (
|
|
1069
|
-
<CometChatSearch
|
|
1070
|
-
uid={selectedUser?.getUid()}
|
|
1071
|
-
guid={selectedGroup?.getGuid()}
|
|
1072
|
-
onMessageClicked={(msg) => {
|
|
1073
|
-
setShowMessageSearch(false);
|
|
1074
|
-
// scroll to the message in the message list
|
|
1075
|
-
}}
|
|
1076
|
-
/>
|
|
1077
|
-
)}
|
|
1078
|
-
```
|
|
1079
|
-
|
|
1080
|
-
---
|
|
1081
|
-
|
|
1082
|
-
### Details panel
|
|
1083
|
-
|
|
1084
|
-
User and group detail panels are **custom-built** — there is no pre-built `CometChatUserDetails` or `CometChatGroupDetails` export in the UI Kit. The v6 sample app has reference implementations at `sample-app/src/components/CometChatDetails/`.
|
|
1085
|
-
|
|
1086
|
-
**For user details:** build a custom component using `CometChatAvatar` + user info + action buttons (block/unblock). Fetch the pattern from the sample app's `CometChatUserDetails.tsx`.
|
|
1087
|
-
|
|
1088
|
-
**For group details:** build a custom component and use these real UI Kit components inside it:
|
|
1089
|
-
|
|
1090
|
-
```tsx
|
|
1091
|
-
// Open details from the message header:
|
|
1092
|
-
<CometChatMessageHeader
|
|
1093
|
-
user={selectedUser}
|
|
1094
|
-
group={selectedGroup}
|
|
1095
|
-
onItemClick={() => setShowDetails(true)}
|
|
1096
|
-
/>
|
|
1097
|
-
|
|
1098
|
-
// Group details panel uses real kit components:
|
|
1099
|
-
{showDetails && selectedGroup && (
|
|
1100
|
-
<div style={{ width: "320px", borderLeft: "1px solid #eee" }}>
|
|
1101
|
-
{/* CometChatGroupMembers is a real kit component */}
|
|
1102
|
-
<CometChatGroupMembers
|
|
1103
|
-
group={selectedGroup}
|
|
1104
|
-
onItemClick={(member) => {
|
|
1105
|
-
// Switch to 1:1 chat with this member
|
|
1106
|
-
}}
|
|
1107
|
-
/>
|
|
1108
|
-
{/* Banning is handled inside CometChatGroupMembers — there is no separate
|
|
1109
|
-
CometChatBannedMembers export in the v6 kit. */}
|
|
1110
|
-
</div>
|
|
1111
|
-
)}
|
|
1112
|
-
```
|
|
1113
|
-
|
|
1114
|
-
**Important:** `CometChatGroupMembers` requires the `group` prop (it's the only required prop). The component handles member listing, search, scope changes, kick, and ban actions internally.
|
|
1115
|
-
|
|
1116
|
-
---
|
|
1117
|
-
|
|
1118
|
-
### Calls integration
|
|
1119
|
-
|
|
1120
|
-
Add voice/video calling to your message view, plus incoming call handling at the app root.
|
|
1121
|
-
|
|
1122
|
-
```tsx
|
|
1123
|
-
// 1. Add call buttons to the message header:
|
|
1124
|
-
<CometChatMessageHeader
|
|
1125
|
-
user={selectedUser}
|
|
1126
|
-
auxiliaryButtonView={<CometChatCallButtons user={selectedUser} />}
|
|
1127
|
-
/>
|
|
1128
|
-
|
|
1129
|
-
// 2. Mount incoming call handler at the app root (outside any route):
|
|
1130
|
-
function App() {
|
|
1131
|
-
return (
|
|
1132
|
-
<>
|
|
1133
|
-
<CometChatIncomingCall />
|
|
1134
|
-
<Routes>
|
|
1135
|
-
{/* your routes */}
|
|
1136
|
-
</Routes>
|
|
1137
|
-
</>
|
|
1138
|
-
);
|
|
1139
|
-
}
|
|
1140
|
-
```
|
|
1141
|
-
|
|
1142
|
-
`CometChatIncomingCall` must be mounted at the top level so it can show the incoming call overlay regardless of which page the user is on. `CometChatOutgoingCall` and `CometChatOngoingCall` are automatically rendered by the call flow.
|