@cometchat/skills 4.4.2 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +55 -0
- package/.claude-plugin/plugin.json +14 -0
- package/CHANGELOG.md +36 -0
- package/LICENSE +21 -0
- package/README.md +41 -163
- package/RULES.md +114 -0
- package/bin/cometchat-skills.mjs +1180 -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 +151 -74
- package/peers.yaml +312 -0
- package/registry/README.md +31 -0
- package/registry/android-calls-v5.json +54 -0
- package/registry/android-v6.json +137 -0
- package/registry/angular-v5.json +114 -0
- package/registry/flutter-calls-v5.json +54 -0
- package/registry/flutter-v6.json +119 -0
- package/registry/ios-calls-v5.json +59 -0
- package/registry/ios-v5.json +97 -0
- package/registry/rn-calls-v5.json +59 -0
- package/registry/rn-v5.json +129 -0
- package/registry/sdk-android-v5.json +53 -0
- package/registry/sdk-jsv4.json +53 -0
- package/registry/web-calls-v5.json +54 -0
- package/registry/web-v7.json +99 -0
- package/skills/cometchat/SKILL.md +42 -2096
- 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 +40 -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 +101 -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-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 +131 -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 +58 -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-ios-calls/SKILL.md +112 -563
- package/skills/cometchat-ios-components/SKILL.md +44 -834
- package/skills/cometchat-ios-core/SKILL.md +181 -1068
- package/skills/cometchat-ios-core/references/anti-patterns.md +80 -0
- package/skills/cometchat-ios-core/references/docs-map.md +123 -0
- package/skills/cometchat-ios-core/references/install.md +23 -0
- package/skills/cometchat-ios-core/references/layout.md +186 -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-push/SKILL.md +24 -602
- 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-onboarding/SKILL.md +89 -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 +90 -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 +313 -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 +126 -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 +78 -0
- package/skills/cometchat-react-native-push/SKILL.md +88 -0
- package/skills/cometchat-react-native-sdk/SKILL.md +126 -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 +116 -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/i18n-rtl-a11y.md +22 -0
- package/skills/cometchat-react-v7-core/references/layout.md +158 -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-core/references/troubleshooting.md +28 -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-push/SKILL.md +53 -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 +909 -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 +130 -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-a11y/SKILL.md +0 -477
- 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-i18n/SKILL.md +0 -419
- 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-production/SKILL.md +0 -738
- package/skills/cometchat-ios-testing/SKILL.md +0 -376
- package/skills/cometchat-ios-theming/SKILL.md +0 -667
- package/skills/cometchat-ios-troubleshooting/SKILL.md +0 -1003
- 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
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Setup & credentials
|
|
2
|
+
|
|
3
|
+
## 1. Reuse before asking
|
|
4
|
+
A prior `.cometchat/config.json`, or an `environment.ts` that already has a non-empty `appId` → reuse it. Skip re-provisioning and do not re-ask.
|
|
5
|
+
|
|
6
|
+
## 2. Credentials — OFFER the dashboard fetch, don't default to manual paste
|
|
7
|
+
When credentials are missing, present **both** paths and default to the fetch:
|
|
8
|
+
|
|
9
|
+
> *"I can fetch your App ID / Region / Auth Key by logging into your CometChat dashboard (I'll load the CometChat CLI to do it), or you can paste them manually — which do you prefer?"*
|
|
10
|
+
|
|
11
|
+
**Never silently skip to "paste them yourself", and never end the build with a "to finish, add credentials manually" TODO.** Only load the CLI if the user picks the fetch; a manual paste never touches it.
|
|
12
|
+
|
|
13
|
+
### The CLI — dashboard/API client only, loaded on demand
|
|
14
|
+
`@cometchat/skills-cli` does four things: `auth` (dashboard login), `provision` (fetch App ID/Region/Auth Key), `config`, and `features <list|enable|disable|ai-key>` (toggle dashboard extensions + AI) — §7 below uses that fourth one. It knows nothing about Angular, does **not** write env files, detect the project, or generate code — the SKILL owns all of that.
|
|
15
|
+
|
|
16
|
+
Load it on demand from public npm (`@3` pins the CLI major that matches the v5 skills):
|
|
17
|
+
```bash
|
|
18
|
+
npx @cometchat/skills-cli@3 <cmd>
|
|
19
|
+
```
|
|
20
|
+
No auth needed.
|
|
21
|
+
|
|
22
|
+
### Fetch path (user opted in)
|
|
23
|
+
Let each command finish — do not background or race them. `<cli>` = the full invocation above.
|
|
24
|
+
|
|
25
|
+
1. **Check auth:** `<cli> auth status --json` → `logged-in` | `logged-out`.
|
|
26
|
+
2. **Log in if needed:** `<cli> auth login` — opens the dashboard in a browser, polls, stores the bearer in the OS keychain. Surface terminal errors verbatim (`ACCESS_DENIED` / `EXPIRED` / `TIMEOUT` / `ABORTED`) and stop; do not retry silently.
|
|
27
|
+
> **If the browser is NOT already signed in to the dashboard — tell the user this BEFORE running the command.** `auth login` opens a URL carrying a one-time device-session id and then polls for up to **15 minutes**. If the browser is signed out, the dashboard redirects to its login page, and after signing in it drops the user on the dashboard home — **not back at the authorization URL**. The session is never authorized, the CLI polls until `TIMEOUT`, and it looks like "login worked but the CLI still can't see my apps".
|
|
28
|
+
>
|
|
29
|
+
> Say this up front: *"A browser window will open. If you're asked to sign in, sign in — then come back and open that same URL again (I'll print it). The CLI keeps waiting for up to 15 minutes."*
|
|
30
|
+
>
|
|
31
|
+
> - **Do NOT kill the command** while the user signs in — it is still polling, and re-running it invalidates the previous session id.
|
|
32
|
+
> - On `TIMEOUT` the CLI re-prints the URL. Opening it again while signed in completes immediately; that is the recovery, not a re-login.
|
|
33
|
+
> - `ALREADY_AUTHENTICATED` means the session id was already consumed — run `auth status` before assuming failure; you may already be logged in.
|
|
34
|
+
|
|
35
|
+
3. **Pick the app — reuse first, ask with CURATED options, never auto-create.** `<cli> provision list --json` returns the raw list; the SKILL decides how to present it. Rank by relevance (technology matching Angular, then most recent) and offer at most 4: the **top 3** (name · region · App ID) plus **"Show all N apps"**. The free-text/"Other" answer is the manual-paste path. Only list everything if they pick "show all". **Never dump 29 apps as the primary prompt.** Never create an app unprompted; zero apps → ask first.
|
|
36
|
+
4. **Fetch:** `<cli> provision use --app-id "<id>" --json` returns `{ appId, region, authKey }` and writes a framework-neutral `.cometchat/config.json`. It writes no env file. Treat the Auth Key as a secret — never echo it back.
|
|
37
|
+
|
|
38
|
+
### Manual path
|
|
39
|
+
Dashboard → your app → **Credentials** → App ID, Region (`us` / `eu` / `in`), Auth Key (**dev only**). If neither path yields them, ASK and WAIT — never proceed with placeholders.
|
|
40
|
+
|
|
41
|
+
## 3. Write the config — Angular's shape
|
|
42
|
+
Angular resolves config at **build time** via file replacement. There is no `.env` and no bundler prefix.
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
// src/environments/environment.ts
|
|
46
|
+
export const environment = {
|
|
47
|
+
production: false,
|
|
48
|
+
cometchat: { appId: 'APP_ID', region: 'REGION', authKey: 'AUTH_KEY' },
|
|
49
|
+
};
|
|
50
|
+
```
|
|
51
|
+
```ts
|
|
52
|
+
// src/environments/environment.prod.ts — no authKey in production
|
|
53
|
+
export const environment = {
|
|
54
|
+
production: true,
|
|
55
|
+
cometchat: { appId: 'APP_ID', region: 'REGION', authKey: '' },
|
|
56
|
+
};
|
|
57
|
+
```
|
|
58
|
+
```json
|
|
59
|
+
// angular.json → the production configuration
|
|
60
|
+
"fileReplacements": [
|
|
61
|
+
{ "replace": "src/environments/environment.ts",
|
|
62
|
+
"with": "src/environments/environment.prod.ts" }
|
|
63
|
+
]
|
|
64
|
+
```
|
|
65
|
+
Angular 15+ omits `src/environments/` from the scaffold — create it if absent.
|
|
66
|
+
|
|
67
|
+
## 4. ⚠️ After writing credentials, GITIGNORE the file (required step)
|
|
68
|
+
This is the Angular-specific trap, and it is worse than React's. A `.env` at least looks like a secret and many scaffolds ignore it. `src/environments/environment.ts` is **ordinary source that Angular's scaffold commits by default** — so the moment you write a real Auth Key into it, the developer's next `git commit -a` publishes a credential that can mint a session for **any user in the app**.
|
|
69
|
+
|
|
70
|
+
Shipping the file empty is right, but it does not solve this: the file becomes dangerous exactly when the skill does its job. So writing credentials and securing the file are **one action**, not two.
|
|
71
|
+
|
|
72
|
+
Do this immediately after writing the values:
|
|
73
|
+
|
|
74
|
+
1. **Add it to `.gitignore`:**
|
|
75
|
+
```
|
|
76
|
+
/src/environments/environment.ts
|
|
77
|
+
```
|
|
78
|
+
2. **Commit a template instead** so a fresh clone still builds — without it the build fails with `Cannot find module '../environments/environment'`:
|
|
79
|
+
```ts
|
|
80
|
+
// src/environments/environment.example.ts (tracked, empty)
|
|
81
|
+
export const environment = {
|
|
82
|
+
production: false,
|
|
83
|
+
cometchat: { appId: '', region: '', authKey: '' },
|
|
84
|
+
};
|
|
85
|
+
```
|
|
86
|
+
3. **Tell the developer** the file is now ignored and that a new clone must copy the example across.
|
|
87
|
+
4. **Check whether it was already tracked** — `git ls-files --error-unmatch src/environments/environment.ts`. If it was, `git rm --cached` it as part of the same change, or the ignore rule does nothing.
|
|
88
|
+
|
|
89
|
+
> **Divergence from the docs.** `{DOCS_BASE}/ui-kit/angular/integration.md` shows the same `environment.ts` shape used here, but says nothing about the file being tracked or about gitignoring it. That is an omission, not permission — the guide is showing you where config goes, not making a security claim. Perform the steps above regardless.
|
|
90
|
+
|
|
91
|
+
`environment.prod.ts` stays **tracked**, with **`appId` and `region` POPULATED** and only
|
|
92
|
+
`authKey` empty. App ID and Region are not secrets — they identify the app; the Auth Key is
|
|
93
|
+
the secret, and production mints a per-user token server-side instead
|
|
94
|
+
(`cometchat-angular-v5-production`).
|
|
95
|
+
|
|
96
|
+
> ⚠️ **Leaving `appId`/`region` empty produces a build that succeeds and then does nothing.**
|
|
97
|
+
> `ng build` is green, but at runtime `main.ts`'s credential guard throws before
|
|
98
|
+
> `bootstrapApplication`, so `app-root` stays empty and the page is blank — with the thrown
|
|
99
|
+
> message visible only in the console. "The production build passed" is not evidence the
|
|
100
|
+
> artifact boots: serve `dist/` and confirm the conversation list actually renders.
|
|
101
|
+
|
|
102
|
+
**CI injection** — writing the file from CI secrets at build time — is a fine addition, but it is not an alternative: it does nothing for the local file the skill just wrote.
|
|
103
|
+
|
|
104
|
+
**If an Auth Key was already committed, it must be ROTATED in the dashboard.** Deleting it in a later commit does not help; it is in the history and in every clone.
|
|
105
|
+
|
|
106
|
+
## 5. Verify before building anything
|
|
107
|
+
```ts
|
|
108
|
+
const { appId, region, authKey } = environment.cometchat;
|
|
109
|
+
if (!appId || !region || !authKey) {
|
|
110
|
+
throw new Error('CometChat credentials empty — check src/environments/environment.ts.');
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
Failing loudly here saves a long debug session: without it, init rejects and every list renders empty with no obvious cause. An empty credential otherwise surfaces later as a cryptic `ERROR_API_KEY_NOT_FOUND`. A failure on init or login is most often a **Region mismatch** — re-check the dashboard value.
|
|
114
|
+
|
|
115
|
+
## 6. Which UID to log in as — do NOT invent one
|
|
116
|
+
`login(uid)` authenticates as a user that **must already exist**; it does not create one. Logging in as a missing UID fails and the screen stays blank.
|
|
117
|
+
|
|
118
|
+
- **Never suggest a remembered "classic sample" UID** — `superhero1`, `cc-user-*` and similar are not seeded in modern apps and only mislead.
|
|
119
|
+
- The only tentative suggestion allowed is `cometchat-uid-1..5`, and only labelled *"if this is a freshly-created app"* — never presented as known-good for this app.
|
|
120
|
+
- **Ask the user.** Dashboard → your app → **Users** lists every UID. Prefer their answer over any suggestion.
|
|
121
|
+
- **When no UID is known, do not guess — use create-if-missing.** `ensureDevUser()` in `lifecycle.md` calls `CometChatUIKit.createUser()` then logs in, which is valid on any app without probing. Dev only; production uses a server-minted token.
|
|
122
|
+
|
|
123
|
+
## 7. Dashboard-gated features
|
|
124
|
+
Extensions and AI features are dashboard toggles. The CLI can flip them (`<cli> features list`, `<cli> features enable <id>`), or do it in the dashboard. Either way you still wire any client component — see `cometchat-angular-v5-features`.
|
|
125
|
+
|
|
126
|
+
## 8. Production
|
|
127
|
+
Mint a per-user **auth token** from your backend and call `loginWithAuthToken` — never ship the Auth Key to the browser. See `cometchat-angular-v5-production`.
|
|
128
|
+
|
|
129
|
+
## Checklist
|
|
130
|
+
- [ ] Reused existing config if present
|
|
131
|
+
- [ ] Offered dashboard fetch **and** manual paste; did not default to paste
|
|
132
|
+
- [ ] `environment.ts` written; `environment.prod.ts` has an empty `authKey`
|
|
133
|
+
- [ ] `fileReplacements` wired in `angular.json`
|
|
134
|
+
- [ ] **`environment.ts` gitignored immediately after writing credentials**, `environment.example.ts` committed, developer told
|
|
135
|
+
- [ ] If it was already tracked, `git rm --cached` applied in the same change
|
|
136
|
+
- [ ] Credentials validated at startup with a thrown error
|
|
137
|
+
- [ ] Login UID confirmed to exist (asked, not guessed)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Theming — CSS variables, brand, light/dark
|
|
2
|
+
|
|
3
|
+
## How the kit is themed
|
|
4
|
+
Everything is CSS custom properties, prefixed `--cometchat-`. Override them anywhere that cascades to the kit — usually `styles.css`.
|
|
5
|
+
|
|
6
|
+
```css
|
|
7
|
+
/* styles.css */
|
|
8
|
+
:root {
|
|
9
|
+
--cometchat-primary-color: #6851D6;
|
|
10
|
+
--cometchat-neutral-color-300: #E8E8E8;
|
|
11
|
+
--cometchat-border-color-default: #DCDCDC;
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
Register the kit stylesheet first (`angular.json` → `styles`), or there is nothing to override. Full token list: `{DOCS_BASE}/ui-kit/angular/customization/theming.md`.
|
|
15
|
+
|
|
16
|
+
## Light / dark — ThemeService applies, but does NOT persist
|
|
17
|
+
`ThemeService` (injectable, `providedIn: 'root'`) owns applying the theme: it sets a `currentTheme` signal, writes `data-theme` on `<html>` through the `DOCUMENT` token (SSR-safe), reads the OS `prefers-color-scheme` on construction, and keeps its own `matchMedia` listener so the UI follows the OS live.
|
|
18
|
+
|
|
19
|
+
> ⚠️ **Its docstrings are wrong about persistence — verified against the shipped 5.1.0 code.** `initFromPreference()` claims to read `localStorage` first; `setTheme()` and `toggleTheme()` claim to persist. **The class never touches `localStorage` at all** — `applyTheme()` only sets the signal and the attribute. A manual toggle is therefore **lost on reload**. Do not repeat the docstring's claim to the developer.
|
|
20
|
+
|
|
21
|
+
Follow the OS — this part works, one line at app start:
|
|
22
|
+
```ts
|
|
23
|
+
import { Component, inject } from '@angular/core';
|
|
24
|
+
import { ThemeService } from '@cometchat/chat-uikit-angular';
|
|
25
|
+
|
|
26
|
+
@Component({ selector: 'app-root', standalone: true, template: '<router-outlet />' })
|
|
27
|
+
export class AppComponent {
|
|
28
|
+
constructor() { inject(ThemeService).initFromPreference(); }
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### If the user needs a manual toggle that survives reload
|
|
33
|
+
Add **only** the missing persistence. Let the kit keep applying themes and watching the OS — a second `matchMedia` listener will drift from `currentTheme()`.
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { Injectable, inject, effect } from '@angular/core';
|
|
37
|
+
import { ThemeService } from '@cometchat/chat-uikit-angular';
|
|
38
|
+
|
|
39
|
+
const KEY = 'app.theme';
|
|
40
|
+
|
|
41
|
+
@Injectable({ providedIn: 'root' })
|
|
42
|
+
export class ThemePreference {
|
|
43
|
+
private theme = inject(ThemeService);
|
|
44
|
+
|
|
45
|
+
restore() {
|
|
46
|
+
const saved = localStorage.getItem(KEY);
|
|
47
|
+
if (saved === 'light' || saved === 'dark') this.theme.setTheme(saved);
|
|
48
|
+
}
|
|
49
|
+
set(next: 'light' | 'dark') {
|
|
50
|
+
localStorage.setItem(KEY, next);
|
|
51
|
+
this.theme.setTheme(next);
|
|
52
|
+
}
|
|
53
|
+
toggle() { this.set(this.theme.currentTheme() === 'dark' ? 'light' : 'dark'); }
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
Call `restore()` once at app start, **after** `initFromPreference()`, so a stored choice wins over the OS default. Route every user-facing toggle through `set()`/`toggle()` rather than `ThemeService` directly, or the write is skipped.
|
|
57
|
+
|
|
58
|
+
**Known residual, accepted:** if the OS theme changes while the app is open, the kit's own listener applies it and overrides a stored manual choice until the next reload — its "only follow system changes if the user has not set a manual preference" comment describes a check the code does not have. Fixing that from outside means racing the kit's listener, which is worse than the bug. Leave it.
|
|
59
|
+
|
|
60
|
+
`CometChatUIKit.themeMode` (`'light' | 'dark'`) still exists for a one-off set without DI, but `ThemeService` is the supported path.
|
|
61
|
+
|
|
62
|
+
## Scoping a theme to part of the app
|
|
63
|
+
Set the variables on a wrapper rather than `:root`:
|
|
64
|
+
```css
|
|
65
|
+
.cc-brand-dark { --cometchat-primary-color: #1B1B1B; }
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Do not
|
|
69
|
+
- Do not restyle kit internals with descendant selectors keyed on generated class names — they change between releases. Use the variables.
|
|
70
|
+
- Do not use `!important` to win against the kit; if a variable is not taking effect, the stylesheet is not registered or your rule is not in the cascade path.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Troubleshooting — symptom → cause → fix
|
|
2
|
+
|
|
3
|
+
| Symptom | Cause | Fix |
|
|
4
|
+
| --- | --- | --- |
|
|
5
|
+
| Element renders nothing, no error | class not in `imports: []` | add it to that component's `imports` array |
|
|
6
|
+
| `npm install` fails with `ERESOLVE` | project is on Angular 22 | scaffold with `@angular/cli@21`; peer range is `<22.0.0` |
|
|
7
|
+
| Build error: path not exported by package | `@import` of the kit stylesheet | register the full `node_modules/...` path in `angular.json` `styles` |
|
|
8
|
+
| Blank pane, correct markup | ancestor has no height | `html, body { height: 100% }` + `100dvh` shell + `min-height: 0` |
|
|
9
|
+
| Lists render but always empty | rendering before `login()` resolved | init → login must resolve before bootstrap |
|
|
10
|
+
| "Please wait until the previous login request ends." | concurrent `login()` | cache the in-flight promise (`lifecycle.md`) |
|
|
11
|
+
| Config appears empty at runtime | credentials put in `.env` | Angular reads `environment.ts`, not `.env` |
|
|
12
|
+
| Messages arrive but UI does not update | Async SDK callback doesn't repaint (Angular v21 is zoneless by default, so `NgZone.run()` won't help) | write to a **signal** or call `ChangeDetectorRef.markForCheck()` after the update (`lifecycle.md`) |
|
|
13
|
+
| Memory grows on each route change | no teardown | `takeUntil(destroy$)` + `removeMessageListener(id)` in `ngOnDestroy` |
|
|
14
|
+
| Import fails to compile | used the bare class name | use the exported `…Component` form (AI-assistant exports are the exception) |
|
|
15
|
+
| Header shows one chat, messages another | `[user]`/`[group]` mismatch across components | pass the same subject to header, list and composer |
|
|
16
|
+
| Clicking a conversation does not highlight it | `activeConversation` not bound | bind it to the same state that drives the message pane |
|
|
17
|
+
| Reply button does nothing | thread surface not rendered | wire a thread panel or hide the affordance |
|
|
18
|
+
| Dropdown or menu clipped | ancestor `overflow: hidden` or `transform` | remove it from the chain, or move the overlay root |
|
|
19
|
+
| Composer off-screen on mobile | `100vh` instead of `100dvh` | use `100dvh` |
|
|
20
|
+
| Layout jumps when messages load | box sizes to content | pin the height so loading and loaded share one box |
|
|
21
|
+
| Calls never ring | calls SDK missing or calling not enabled | install `@cometchat/calls-sdk-javascript@^5`; check `isCallingEnabled()` |
|
|
22
|
+
| Feature absent with no error | dashboard extension not enabled | enable it in the dashboard; most extensions need no client code |
|
|
23
|
+
|
|
24
|
+
## When none of these fit
|
|
25
|
+
1. Confirm the symbol exists — the exported name, not the docs title.
|
|
26
|
+
2. Fetch the component's docs page (`docs-map.md`) and compare inputs against what you passed.
|
|
27
|
+
3. Check the browser console for a CometChat error code before assuming it is a UI problem.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cometchat-angular-v5-customization
|
|
3
|
+
description: "Brand and customize the CometChat Angular UI Kit — CSS variable tokens, light/dark via ThemeService, localization, date/time formats, global config, and swapping component regions with ng-template. Triggers: 'change the chat colours', 'match my brand angular', 'dark mode', 'translate the chat', 'change the date format', 'custom avatar in the list'."
|
|
4
|
+
license: "MIT"
|
|
5
|
+
compatibility: "@cometchat/chat-uikit-angular ^5 (5.1.0–5.2.0 verified); Angular 17-21"
|
|
6
|
+
metadata:
|
|
7
|
+
author: "CometChat"
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
tags: "cometchat angular customization theming v5 branding dark-mode localization tokens"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
> **Ground truth:** `@cometchat/chat-uikit-angular@5` (5.1.0–5.2.0 verified). Theme tokens, `ThemeService` and the global config are FETCHED from `{DOCS_BASE}/ui-kit/angular/customization/theming.md`, `/customization/global-config.md`, `/customization/localization.md`, `/customization/date-time-formatting.md` and `/message-bubble-styling.md` — base + paths in `cometchat-angular-v5-core/references/docs-map.md`. CSS variable names are version-pinned; never invent a token.
|
|
13
|
+
|
|
14
|
+
## Companion skills (read first)
|
|
15
|
+
- `cometchat-angular-v5-core` — install and `references/theming.md` for the token basics. Assumed.
|
|
16
|
+
- `cometchat-angular-v5-components` — view slots, when the change is structural rather than visual.
|
|
17
|
+
|
|
18
|
+
## Use this skill when
|
|
19
|
+
Changing how the kit **looks or reads**: colours, fonts, dark mode, language, date formats, or replacing a region's markup.
|
|
20
|
+
|
|
21
|
+
## Pick the smallest lever
|
|
22
|
+
| Want | Use | Cost |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| Different colours / spacing | CSS variables | one stylesheet |
|
|
25
|
+
| Light ↔ dark | `ThemeService` | one line |
|
|
26
|
+
| Different language | `CometChatLocalize` | config |
|
|
27
|
+
| Different date format | per-component `*DateTimeFormat` inputs | one input |
|
|
28
|
+
| Different markup in a region | `*View` slot + `ng-template` | a template |
|
|
29
|
+
| Different behaviour | not customization — see `features` or `components` | — |
|
|
30
|
+
|
|
31
|
+
Reach for the first that works. Replacing a whole region to change a colour throws away selection, presence and receipts.
|
|
32
|
+
|
|
33
|
+
## CSS variables
|
|
34
|
+
Every visual is a `--cometchat-*` custom property. Override wherever it cascades — usually `styles.css`.
|
|
35
|
+
```css
|
|
36
|
+
:root {
|
|
37
|
+
--cometchat-primary-color: #6851D6;
|
|
38
|
+
--cometchat-border-color-default: #DCDCDC;
|
|
39
|
+
--cometchat-text-color-primary: #141414;
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
Scope to part of the app by setting them on a wrapper instead of `:root`. Full token list: `{DOCS_BASE}/ui-kit/angular/customization/theming.md`.
|
|
43
|
+
|
|
44
|
+
Never target generated class names with descendant selectors — they change between releases. Never use `!important`; if a token is not applying, the kit stylesheet is not registered (`angular.json` → `styles`) or your rule is not in the cascade path.
|
|
45
|
+
|
|
46
|
+
## Light / dark — ThemeService does it all
|
|
47
|
+
```ts
|
|
48
|
+
import { Component, inject } from '@angular/core';
|
|
49
|
+
import { ThemeService } from '@cometchat/chat-uikit-angular';
|
|
50
|
+
|
|
51
|
+
@Component({ selector: 'app-root', standalone: true, template: '<router-outlet />' })
|
|
52
|
+
export class AppComponent {
|
|
53
|
+
constructor() { inject(ThemeService).initFromPreference(); }
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
That single call respects the OS `prefers-color-scheme`, applies `data-theme` to `<html>` via the `DOCUMENT` token (SSR-safe), and keeps its own `matchMedia` listener so the UI follows the OS live.
|
|
57
|
+
|
|
58
|
+
> ⚠️ **It does NOT persist, despite its docstrings.** Verified against shipped 5.1.0: `initFromPreference()` claims to read `localStorage` first and `setTheme()`/`toggleTheme()` claim to persist, but the class never touches `localStorage` — a manual toggle is lost on reload. If the user needs a toggle that survives reload, add persistence **around** the service (`cometchat-angular-v5-core/references/theming.md`) rather than replacing it; a second `matchMedia` listener will drift from `currentTheme()`.
|
|
59
|
+
|
|
60
|
+
Toggle: `themeService.toggleTheme()` — do not compute the next value yourself. Set a specific mode: `themeService.setTheme('dark')`. Read: `themeService.currentTheme()` — a signal, so it works directly in templates.
|
|
61
|
+
|
|
62
|
+
> **Divergence from the docs.** `{DOCS_BASE}/ui-kit/angular/customization/theming.md` documents `setTheme()`, `toggleTheme()` and setting `data-theme` by hand, but does **not** mention `initFromPreference()` or following the OS `prefers-color-scheme`. `initFromPreference()` is real and verified against the installed 5.1.0 kit — prefer it over a hand-written `matchMedia` listener. Do not "correct" it away because the guide omits it; the omission is a docs gap, not evidence the method is wrong.
|
|
63
|
+
|
|
64
|
+
> Do **not** hand-roll a `matchMedia('(prefers-color-scheme: dark)')` listener. That is the React recipe; React's kit cannot read the OS. Angular's can, and duplicating it creates state that drifts from `currentTheme()`.
|
|
65
|
+
|
|
66
|
+
## Localization
|
|
67
|
+
`CometChatLocalize` ships 19 languages. Set the language once at startup; the `TranslatePipe` and `getLocalizedString()` read from it. To override individual strings or add a language, fetch `{DOCS_BASE}/ui-kit/angular/customization/localization.md` — the override shape is version-specific and worth reading rather than guessing.
|
|
68
|
+
|
|
69
|
+
## Date & time formats
|
|
70
|
+
Per-component inputs, not global CSS: `lastMessageDateTimeFormat` (conversations), `messageSentAtDateTimeFormat` (search), `callInitiatedDateTimeFormat` (call logs), `lastActiveAtDateTimeFormat` (message header). Pipes `CalendarDatePipe`, `MessageDatePipe` and `ConversationDatePipe` are exported if you need the same formatting in your own markup.
|
|
71
|
+
|
|
72
|
+
## Global config
|
|
73
|
+
`COMETCHAT_GLOBAL_CONFIG` is an injection token for app-wide kit defaults. Prefer it over repeating the same input on every component instance. Details: `{DOCS_BASE}/ui-kit/angular/customization/global-config.md`.
|
|
74
|
+
|
|
75
|
+
## Structural changes
|
|
76
|
+
Replacing markup rather than styling it is a **view slot** — `itemView`, `titleView`, `subtitleView`, `leadingView`, `trailingView`, `headerView`, `emptyView`, `errorView`, `loadingView`. See `cometchat-angular-v5-components`. Override the smallest slot that does the job.
|
|
77
|
+
|
|
78
|
+
## Common pitfalls
|
|
79
|
+
1. **Hand-rolling OS theme detection** — `ThemeService.initFromPreference()` already does it.
|
|
80
|
+
2. **Replacing `itemView` for a colour change** — loses selection, presence and receipts.
|
|
81
|
+
3. **Styling generated class names** — breaks on the next kit release.
|
|
82
|
+
4. **`!important` wars** — the stylesheet is not registered, or the rule is out of cascade.
|
|
83
|
+
5. **Two theme sources** — `ThemeService` plus your own `data-theme` writer; they drift.
|
|
84
|
+
|
|
85
|
+
## Verify it works
|
|
86
|
+
Brand colours apply in both themes · dark mode survives a reload ONLY if you persisted the choice yourself (the kit does not — see the warning above); without that, a reload falls back to the OS setting · the OS theme is respected on first load · localized strings render · overridden regions keep click, presence and receipts working.
|
|
87
|
+
|
|
88
|
+
## Explain what you built (REQUIRED close)
|
|
89
|
+
Tell the developer what changed, naming the files: what you themed — which tokens changed and whether light/dark follows the OS. Flag anything dev-only as dev-only, and say what you did **not** touch — this is additive.
|
|
90
|
+
|
|
91
|
+
**Then offer these THREE options as a SELECTABLE choice and WAIT for the pick — never auto-continue (`RULES.md` §19):**
|
|
92
|
+
1. **Add another feature** → a feature from `features.angular-v5.json`, or deeper structural customization via view slots. **Never offer an `auto` entry** (reactions, mentions, receipts, typing, media) — those are core in v5 and already on.
|
|
93
|
+
2. **Add a feature** (search, calls, polls, AI) → `cometchat-angular-v5-features`.
|
|
94
|
+
3. **Test it manually** → do nothing further; hand back so the user runs it.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cometchat-angular-v5-features
|
|
3
|
+
description: "Enable or build any CometChat feature in an Angular app, and say which need zero client code. Covers: reactions · mentions · threaded replies · search · read receipts · typing indicators · presence · media & file attachments · voice notes · polls · stickers · GIFs · message translation · link preview · thumbnails · pin message · save / bookmark messages · reminders · message shortcuts · voice transcription · rich media preview · URL shortener · collaborative whiteboard & document · disappearing messages · support desk integrations · AI smart replies, conversation starter, summary and assistant · voice & video calling · push notifications · notification feed · moderation & reporting · campaigns · custom message types · text formatters & rich text · card messages. Triggers: 'add polls angular', 'enable reactions', 'let users save/bookmark messages', 'pin a message', 'add smart replies', 'turn on translation', 'add stickers or GIFs', 'send a custom message type', 'enable an extension angular'."
|
|
4
|
+
license: "MIT"
|
|
5
|
+
compatibility: "@cometchat/chat-uikit-angular ^5 (5.1.0–5.2.0 verified); Angular 17-21"
|
|
6
|
+
metadata:
|
|
7
|
+
author: "CometChat"
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
tags: "cometchat angular features v5 extensions ai reactions polls stickers translation"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
> **Ground truth:** the feature existence oracle is `features.angular-v5.json` (pack root). A feature a user asks for MUST be an `id` there — if it is not listed it does not exist; do not invent it. Exact enablement steps and payloads are FETCHED from each entry's `docs_topic` (a PATH — resolve it against `DOCS_BASE` in `cometchat-angular-v5-core/references/docs-map.md`). UI component names come from the `angular-v5` catalog.
|
|
13
|
+
|
|
14
|
+
## Companion skills (read first)
|
|
15
|
+
- `cometchat-angular-v5-core` — install, credentials, `init→login→render`. Assumed, never restated.
|
|
16
|
+
- `cometchat-angular-v5-components` — component names, inputs/outputs, slots.
|
|
17
|
+
|
|
18
|
+
## Use this skill when
|
|
19
|
+
Someone asks to add or enable a capability: "add polls", "enable reactions", "turn on smart replies".
|
|
20
|
+
|
|
21
|
+
## FIRST — classify the request
|
|
22
|
+
Most features need **no client code at all**. Writing some is the most common mistake here.
|
|
23
|
+
|
|
24
|
+
| Class | What you do | Examples |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| **Already on** | Nothing. Confirm and show where it appears. | reactions, mentions, receipts, typing, media attachments, voice notes |
|
|
27
|
+
| **Dashboard extension — zero code** | Enable in the dashboard. Nothing else — the kit either mounts a dedicated bubble component or renders it inline automatically. | polls, stickers, collaborative whiteboard, collaborative document, message translation, link preview, thumbnail generation |
|
|
28
|
+
| **Dashboard extension — HOST-COMPOSED** | Enable in the dashboard, **then you build the UI**: `CometChat.callExtension()` to send/fetch, your own component to render. The dashboard toggle alone does nothing visible. | pin message, save message, message shortcuts, voice transcription, rich media preview, GIFs, reminders, URL shortener, disappearing messages, support integrations |
|
|
29
|
+
| **Dashboard + AI** | Enable in the dashboard, then optionally place a component. | smart replies, conversation starter, conversation summary, AI assistant |
|
|
30
|
+
| **Client code** | Real wiring. | threads, search, custom message types, text formatters, rich text, calls |
|
|
31
|
+
|
|
32
|
+
**10 of the 17 extensions are host-composed — nearly two-thirds.** `needs_stitching: true` in `features.angular-v5.json` is the authoritative signal (not `ui_components`: three zero-code entries — message translation, link preview, thumbnail generation — legitimately have `ui_components: []` because they render inline into an existing bubble/menu rather than through a separately-importable component). Verify against `needs_stitching` before answering, never from memory or from this table's examples alone.
|
|
33
|
+
|
|
34
|
+
Ask which app in the dashboard before telling someone to toggle something.
|
|
35
|
+
|
|
36
|
+
## Already on by default — do NOT "add" these
|
|
37
|
+
`reactions` · `mentions` · delivery/read receipts · typing indicators · media & file attachments · voice notes.
|
|
38
|
+
|
|
39
|
+
These are **core in v5, not extensions**. Angular's extensions page does not list reactions or mentions, which confirms it. If one is not visible the cause is a missing `@Input()` or an unsized container — not a missing feature. Never write a reaction picker or typing indicator by hand.
|
|
40
|
+
|
|
41
|
+
## Dashboard extensions — enabling is necessary, NOT always sufficient
|
|
42
|
+
Dashboard → your app → Extensions → enable. Then **check the running app**, because there are two kinds:
|
|
43
|
+
|
|
44
|
+
**Auto-rendered — emit nothing.** The kit surfaces these itself once enabled: polls, stickers, collaborative document/whiteboard (bubbles in the message list), link preview and thumbnails (inside the bubble), message translation (an entry in the message menu).
|
|
45
|
+
|
|
46
|
+
**Host-composed — the kit renders NO affordance.** Enabling them changes nothing visible; you must call the extension and render your own control:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import { CometChat } from '@cometchat/chat-sdk-javascript';
|
|
50
|
+
|
|
51
|
+
// SEND — exact slug, endpoint and payload are on the extension's own docs page
|
|
52
|
+
await CometChat.callExtension('pin-message', 'POST', 'v1/pin', { msgId, receiverType });
|
|
53
|
+
```
|
|
54
|
+
**Send is only a third of the job.** You also need to FETCH the pinned/saved list back and RENDER it — full pattern, incl. the type-safe way to turn a fetched entry into displayable text: `references/host-composed-extensions.md`.
|
|
55
|
+
|
|
56
|
+
Currently host-composed in Angular (10): **pin message · save message · message shortcuts · voice transcription · rich media preview · GIFs · reminders · URL shortener · disappearing messages · support integrations.** `needs_stitching: true` in `features.angular-v5.json` is the authoritative signal — not `ui_components`, see the table above.
|
|
57
|
+
|
|
58
|
+
> **Do not conclude a feature "does not exist" because the kit has no component and the SDK has no named method for it.** Extensions are reached through the generic `CometChat.callExtension()` — there is no `pinMessage()` to grep for. Searching `node_modules` for the SEND/FETCH calls will find nothing and that is expected.
|
|
59
|
+
|
|
60
|
+
> **`docs_topic` is a PATH, not a URL.** Prefix it with `DOCS_BASE` from `cometchat-angular-v5-core/references/docs-map.md`, then append `.md`:
|
|
61
|
+
> `{DOCS_BASE}` + `/fundamentals/pin-message` + `.md`
|
|
62
|
+
> Do **not** hardcode `https://www.cometchat.com/docs/...`. `DOCS_BASE` may point at a docs preview while a docs change is in flight, and a hardcoded production URL silently reads the pre-change page — so you would fetch a page that is missing the very detail you were sent to find.
|
|
63
|
+
|
|
64
|
+
Available (from Angular's extensions page): Bitly · Link Preview · Message Shortcuts · Pin Message · Rich Media Preview · Save Message · Thumbnail Generation · TinyURL · Voice Transcription · Giphy · Message Translation · Polls · Reminders · Stickers · Stipop · Tenor · Collaborative Document · Collaborative Whiteboard · Disappearing Messages · Chatwoot · Intercom.
|
|
65
|
+
|
|
66
|
+
Two have a bubble you may reference when customizing, but you still do not mount them yourself: `CometChatPollBubbleComponent`, `CometChatStickerBubbleComponent`.
|
|
67
|
+
|
|
68
|
+
**Not available for Angular:** end-to-end encryption, live streaming, email replies. They exist for other platforms. Say so plainly rather than improvising.
|
|
69
|
+
|
|
70
|
+
## AI features
|
|
71
|
+
Enable in the dashboard (AI section), then place the component you need:
|
|
72
|
+
```html
|
|
73
|
+
<cometchat-smart-replies></cometchat-smart-replies>
|
|
74
|
+
<cometchat-conversation-starter></cometchat-conversation-starter>
|
|
75
|
+
<cometchat-conversation-summary></cometchat-conversation-summary>
|
|
76
|
+
```
|
|
77
|
+
`<cometchat-message-list>` also emits `smartReplyClick` and `conversationStarterClick` when those are enabled, so the built-in surfaces work without extra components. The AI assistant is `CometChatAIAssistantChat` — no `Component` suffix.
|
|
78
|
+
|
|
79
|
+
## Features that DO need code
|
|
80
|
+
| Feature | Where |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| Threaded replies | `cometchat-angular-v5-placement` — thread panel |
|
|
83
|
+
| Search | `cometchat-angular-v5-placement` — search column |
|
|
84
|
+
| Custom message types | `references/custom-messages.md` |
|
|
85
|
+
| Text formatters / rich text | `references/formatters.md` |
|
|
86
|
+
| Voice & video calls | `cometchat-angular-v5-calls` |
|
|
87
|
+
| Push notifications | `cometchat-angular-v5-push` |
|
|
88
|
+
|
|
89
|
+
## Common pitfalls
|
|
90
|
+
1. **Building a feature that is already on** — hand-rolled reaction pickers are the classic. Check the "already on" list first.
|
|
91
|
+
2. **Assuming every extension is zero-code** — 10 of them render no affordance and need `CometChat.callExtension()`. Equally, do not write code for the auto-rendered ones.
|
|
92
|
+
3. **Declaring a feature absent because `node_modules` has no method for it** — extensions have no named SDK method; they go through the generic `callExtension()`. Check the extension's docs page before saying it is unsupported.
|
|
93
|
+
4. **Re-implementing a server-side feature in the browser** — `localStorage`, an in-memory `Map`, or a local `BehaviorSubject` where an extension exists. Saved/pinned messages, reminders and shortcuts are stored **server-side and are per-user across devices**; a browser-local copy does not sync to the user's phone and dies with the cache. If a request is about remembering something *about a message*, check `features.angular-v5.json` before writing storage of your own.
|
|
94
|
+
5. **Offering a feature Angular does not have** — E2E encryption, live streaming, email replies.
|
|
95
|
+
6. **Forgetting the dashboard step** — the code is right, the feature is off, and it looks broken.
|
|
96
|
+
7. **Treating reactions/mentions as extensions** — they are core in v5.
|
|
97
|
+
|
|
98
|
+
## Verify it works
|
|
99
|
+
The feature appears in a real conversation · you wrote no code for a dashboard-only feature · the dashboard toggle is on for the app the credentials point at.
|
|
100
|
+
|
|
101
|
+
## Explain what you built (REQUIRED close)
|
|
102
|
+
Tell the developer what changed, naming the files: the feature you just enabled (and whether it needed a dashboard toggle). Flag anything dev-only as dev-only, and say what you did **not** touch — this is additive.
|
|
103
|
+
|
|
104
|
+
**Then offer these THREE options as a SELECTABLE choice and WAIT for the pick — never auto-continue (`RULES.md` §19):**
|
|
105
|
+
1. **Add another feature** → another grow-set feature from `features.angular-v5.json` that is NEITHER wired NOR already enabled — ASK about dashboard state rather than assuming. **Never offer an `auto` entry** (reactions, mentions, receipts, typing, media) — those are core in v5 and already on.
|
|
106
|
+
2. **Customize theming** → `cometchat-angular-v5-customization`.
|
|
107
|
+
3. **Test it manually** → do nothing further; hand back so the user runs it.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Custom message types
|
|
2
|
+
|
|
3
|
+
Angular v5 has **no plugin architecture** — `CometChatMessagePlugin` / `CometChatPluginRegistry` are React v7 symbols and do not exist here. A custom type is three separate concerns: send it, make the list fetch it, render it.
|
|
4
|
+
|
|
5
|
+
## 1. Send — plain SDK
|
|
6
|
+
```ts
|
|
7
|
+
import { CometChat } from '@cometchat/chat-sdk-javascript';
|
|
8
|
+
|
|
9
|
+
async function sendOrderUpdate(receiverId: string) {
|
|
10
|
+
const msg = new CometChat.CustomMessage(
|
|
11
|
+
receiverId,
|
|
12
|
+
CometChat.RECEIVER_TYPE.USER,
|
|
13
|
+
'order_update', // your type key
|
|
14
|
+
{ orderId: 42, status: 'shipped' },
|
|
15
|
+
);
|
|
16
|
+
await CometChat.sendCustomMessage(msg);
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
> ⚠️ **The sender will not see this message until they refresh — unless you publish it.** `<cometchat-message-list>`/`<cometchat-conversations>` render from an internal store that `<cometchat-message-composer>` updates for you on every normal send. A raw SDK call bypasses the composer entirely, so nothing tells the currently-mounted list a message now exists — the SDK real-time listener that would otherwise deliver it does **not** echo a message back to its own sender. This is not specific to custom types: **any message sent by calling the SDK directly instead of through the composer needs this**, including the plain-text reply from a host-composed extension's affordance (`references/host-composed-extensions.md`) or from `custom-messages.md`'s own update path below.
|
|
21
|
+
>
|
|
22
|
+
> Publish it through the kit's own event bus so its list picks it up exactly as if the composer had sent it — verified against the installed 5.1.0 kit: `publishMessageSent(data: IMessages)`, where `IMessages = { message: CometChat.BaseMessage; status: MessageStatus; parentMessageId?: number | null }`. Pass the object, not the bare message — a bare message silently fails the shape the list expects. `CometChatMessageEvents.ccMessageSent` (a raw `Subject`) is the same underlying event but is `@deprecated` in favour of this typed method — do not `.next()` it directly in new code.
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { CometChatMessageEvents, MessageStatus } from '@cometchat/chat-uikit-angular';
|
|
26
|
+
|
|
27
|
+
function announceSent(msg: CometChat.BaseMessage) {
|
|
28
|
+
CometChatMessageEvents.publishMessageSent({ message: msg, status: MessageStatus.success });
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 2. Make the list FETCH it
|
|
33
|
+
`<cometchat-message-list>` fetches only the default types unless told otherwise. Your custom type is silently absent until you widen the request — this is the step people miss.
|
|
34
|
+
|
|
35
|
+
The kit exports the defaults so you extend rather than replace them:
|
|
36
|
+
```ts
|
|
37
|
+
import { CometChat } from '@cometchat/chat-sdk-javascript';
|
|
38
|
+
import { DEFAULT_MESSAGE_TYPES, DEFAULT_MESSAGE_CATEGORIES } from '@cometchat/chat-uikit-angular';
|
|
39
|
+
|
|
40
|
+
class ChatComponent {
|
|
41
|
+
readonly messagesRequestBuilder = new CometChat.MessagesRequestBuilder()
|
|
42
|
+
.setTypes([...DEFAULT_MESSAGE_TYPES, 'order_update'])
|
|
43
|
+
.setCategories([...DEFAULT_MESSAGE_CATEGORIES, CometChat.CATEGORY_CUSTOM])
|
|
44
|
+
.setLimit(30);
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
```html
|
|
48
|
+
<cometchat-message-list [user]="activeUser()" [messagesRequestBuilder]="messagesRequestBuilder"></cometchat-message-list>
|
|
49
|
+
```
|
|
50
|
+
Both constants are `readonly string[]`. Spreading them keeps every built-in type working — hardcoding a list instead is how text messages disappear.
|
|
51
|
+
|
|
52
|
+
## 3. Render it — `MessageBubbleConfigService.setBubbleView()`
|
|
53
|
+
Register a template against your type key. This is the documented API — do **not** reach for `[listItemTemplate]`, and do not reverse-engineer the bubble internals.
|
|
54
|
+
|
|
55
|
+
> ⚠️ **The key is `{type}_{category}` — NOT your bare type.** A custom `location` message registers under **`location_custom`**, because its category is `custom`. This trips everyone: `setBubbleView('location', …)` is accepted silently, never matches, and the bubble renders the kit's fallback **"This message type is not supported."** — which reads like a missing feature rather than a key typo. Built-in keys follow the same rule (`text_message`, `image_message`). Verified against the kit: `type MessageTypeKey` — *"Format: `{type}_{category}`"*.
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { Component, ViewChild, TemplateRef, inject, AfterViewInit } from '@angular/core';
|
|
59
|
+
import { MessageBubbleConfigService } from '@cometchat/chat-uikit-angular';
|
|
60
|
+
|
|
61
|
+
@Component({ /* … */ })
|
|
62
|
+
export class ChatComponent implements AfterViewInit {
|
|
63
|
+
@ViewChild('locationBubble', { static: true }) locationBubble!: TemplateRef<unknown>;
|
|
64
|
+
private bubbleConfig = inject(MessageBubbleConfigService);
|
|
65
|
+
|
|
66
|
+
ngAfterViewInit() {
|
|
67
|
+
this.bubbleConfig.setBubbleView('location_custom', { contentView: this.locationBubble });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
```html
|
|
72
|
+
<ng-template #locationBubble let-message>
|
|
73
|
+
<div class="location-card">{{ message?.getCustomData()?.label }}</div>
|
|
74
|
+
</ng-template>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Register only the parts you want to change; unregistered parts keep their defaults:**
|
|
78
|
+
|
|
79
|
+
| Slot | Replaces |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| `contentView` | the message content — the usual choice for a custom type |
|
|
82
|
+
| `bubbleView` | the entire bubble, losing the built-in frame |
|
|
83
|
+
| `headerView` · `footerView` · `statusInfoView` | partial overrides around the content |
|
|
84
|
+
|
|
85
|
+
Prefer `contentView`: replacing `bubbleView` discards timestamps, receipts, reactions and thread affordances that the default frame provides.
|
|
86
|
+
|
|
87
|
+
Full guide, including the type-key rules: `{DOCS_BASE}/ui-kit/angular/guides/custom-message-types.md`.
|
|
88
|
+
|
|
89
|
+
## 4. Updating a custom message after it was sent — location sharing, live status
|
|
90
|
+
Some custom types change after sending — a live location marker that moves, a poll-style status that ticks over. Do **not** reach for `sendTransientMessage()` for this: transient messages are explicitly *"not saved or tracked anywhere"* and only reach a receiver who is online at that instant (verified against `{SDK_DOCS_BASE}/sdk/javascript/transient-messages.md`) — a location share sent this way vanishes from chat history and never reaches an offline recipient. That is wrong for anything that must persist as a message.
|
|
91
|
+
|
|
92
|
+
**The documented mechanism is `CometChat.editMessage()`** — it accepts a `TextMessage` **or a `CustomMessage`** (`{SDK_DOCS_BASE}/sdk/javascript/edit-message.md`):
|
|
93
|
+
```ts
|
|
94
|
+
import { CometChat } from '@cometchat/chat-sdk-javascript';
|
|
95
|
+
|
|
96
|
+
async function updateLocation(message: CometChat.CustomMessage, lat: number, lng: number) {
|
|
97
|
+
message.setCustomData({ ...message.getCustomData(), lat, lng });
|
|
98
|
+
await CometChat.editMessage(message); // returns the updated BaseMessage
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
Keep the `CustomMessage` instance you sent (or re-fetch it with `CometChat.getMessageDetails(id)`); do not construct a fresh message for an update — `editMessage` mutates the existing one in place, it does not create a new bubble.
|
|
102
|
+
|
|
103
|
+
**`editMessage()` is also a raw SDK call — the EDITOR needs the same local-echo publish as §1's send.** Without it, the person who moved the location marker will not see their own update until they refresh, even though the SDK call succeeded:
|
|
104
|
+
```ts
|
|
105
|
+
import { CometChat } from '@cometchat/chat-sdk-javascript';
|
|
106
|
+
import { CometChatMessageEvents, MessageStatus } from '@cometchat/chat-uikit-angular';
|
|
107
|
+
|
|
108
|
+
async function publishLocalEdit(updated: CometChat.BaseMessage) {
|
|
109
|
+
CometChatMessageEvents.publishMessageEdited({ message: updated, status: MessageStatus.success });
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**The receiver needs a listener, not a poll** — register `onMessageEdited` alongside your other SDK listeners (same `listenerId`/`ngOnDestroy`/repaint conventions as `cometchat-angular-v5-core/references/lifecycle.md`). Angular v21 is **zoneless by default**, so repaint by writing a **signal** (not `NgZone.run()`, which no longer triggers CD):
|
|
114
|
+
```ts
|
|
115
|
+
import { CometChat } from '@cometchat/chat-sdk-javascript';
|
|
116
|
+
import { WritableSignal } from '@angular/core';
|
|
117
|
+
|
|
118
|
+
function registerEditListener(messages: WritableSignal<CometChat.BaseMessage[]>, listenerId: string) {
|
|
119
|
+
CometChat.addMessageListener(listenerId, {
|
|
120
|
+
onMessageEdited: (message: CometChat.BaseMessage) => {
|
|
121
|
+
// update your local message store via the signal so the bubble re-renders (zoneless-safe)
|
|
122
|
+
messages.update((prev) => prev.map((m) => (m.getId() === message.getId() ? message : m)));
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
> **Verify in your running app** whether `<cometchat-message-list>` already re-renders a visible bubble on `onMessageEdited` for you, or whether you must update your own tracked copy of the message and let Angular's change detection pick it up through the bubble's `TemplateRef` context. This is not stated in the docs either way.
|
|
128
|
+
|
|
129
|
+
## What `CometChatTemplatesService` is (and is not)
|
|
130
|
+
It is **not** a custom-type registry, and it is not the API above. It is a DI-based alternative to passing `*View` inputs — `setConversationItemTemplate(TemplateRef)`, `setConversationTitleTemplate(...)`, `setSharedTemplates(...)` and their `get`/`clear` pairs. Use it when the same override applies app-wide. For custom message BUBBLES use `MessageBubbleConfigService`.
|
|
131
|
+
|
|
132
|
+
## If you find yourself reading the kit bundle here, stop
|
|
133
|
+
The three steps above are the documented path, verified against the installed 5.1.0 kit and the live guide. If you are searching `node_modules` for `setBubbleView`, `contentView`, `effectiveContentView` or `MessageTypeKey`, you are re-deriving something the guide already states. **And if your bubble renders "This message type is not supported", the answer is not in the bundle — it is the `{type}_{category}` key above** — fetch `{DOCS_BASE}/ui-kit/angular/guides/custom-message-types.md` instead. Reading the bundle is right only for behaviour the docs genuinely omit (`cometchat-angular-v5-core/SKILL.md`), and custom-message rendering is not one of those.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Text formatters & rich text
|
|
2
|
+
|
|
3
|
+
Angular's formatter surface is richer than React's and has five dedicated guides.
|
|
4
|
+
|
|
5
|
+
## Built-in formatters
|
|
6
|
+
`CometChatTextFormatter` (base) · `CometChatMentionsFormatter` · `CometChatUrlFormatter` · `CometChatEmojiFormatter` · `CometChatMarkdownFormatter`
|
|
7
|
+
|
|
8
|
+
Mentions and URLs are **on by default**. Do not add them.
|
|
9
|
+
|
|
10
|
+
## Applying formatters to a list
|
|
11
|
+
Both `<cometchat-message-list>` and `<cometchat-conversations>` accept a `textFormatters` input:
|
|
12
|
+
```html
|
|
13
|
+
<cometchat-message-list [user]="activeUser()" [textFormatters]="formatters"></cometchat-message-list>
|
|
14
|
+
```
|
|
15
|
+
```ts
|
|
16
|
+
import { CometChatMentionsFormatter, CometChatUrlFormatter } from '@cometchat/chat-uikit-angular';
|
|
17
|
+
readonly formatters = [new CometChatMentionsFormatter(), new CometChatUrlFormatter()];
|
|
18
|
+
```
|
|
19
|
+
Passing `textFormatters` **replaces** the defaults for that component — include the ones you still want.
|
|
20
|
+
|
|
21
|
+
## App-wide defaults
|
|
22
|
+
`FormatterConfigService` sets formatters once for every text-rendering component instead of per-component. Prefer it when the same set applies everywhere.
|
|
23
|
+
|
|
24
|
+
## Custom formatter
|
|
25
|
+
Extend `CometChatTextFormatter`. Fetch `{DOCS_BASE}/ui-kit/angular/guides/custom-text-formatter.md` for the exact hook signatures before implementing — the guides for hashtag, shortcut, mentions and URL formatters each show a working variant.
|
|
26
|
+
|
|
27
|
+
## Rich text editing
|
|
28
|
+
The composer's rich text editor (bold, italic, lists, code, links, undo/redo) is backed by `RichTextEditorService` and uses native browser APIs — no external editor dependency. Guide: `{DOCS_BASE}/ui-kit/angular/guides/rich-text-formatting.md`. Do not bolt on a third-party editor; it will fight the composer's own state.
|