AI Integration Quick Reference
AI Integration Quick Reference
| Field | Value |
|---|---|
| Package | @cometchat/chat-uikit-angular |
| Key components | cometchat-users, cometchat-groups, cometchat-conversations |
| Init | CometChatUIKit.init(uiKitSettings) then CometChatUIKit.login("UID") |
| Purpose | Unified new chat entry point for starting 1:1 or group conversations |
| Sample app | GitHub |
| Related | All Guides |
Components
| Component / Selector | Role |
|---|---|
cometchat-users | Displays list of available users for 1:1 chat creation |
cometchat-groups | Shows available groups for joining |
cometchat-conversations | Navigation component showing existing conversations |
Implementation Steps
1. New Chat State Management
Track whether the new chat view is visible and which tab (Users or Groups) is active.2. New Chat View Template
Render a header with a back button and tabbed navigation between Users and Groups. Selecting a tab switches the list below.3. Integrating New Chat into the Home View
Toggle between the new chat view, the messages view, or an empty state depending on the current app state.4. Group Joining Logic
Handle the join flow based on group type. Public groups are joined directly. Password-protected groups show a password prompt first.Feature Matrix
| Feature | Component / Method | Description |
|---|---|---|
| Open new chat view | showNewChat flag | Toggles the new chat interface |
| User selection | cometchat-users with (itemClick) | Lists users for 1:1 chat creation |
| Group selection | cometchat-groups with (itemClick) | Lists groups for joining |
| Group joining | CometChat.joinGroup() | Handles public and password-protected groups |
| State management | ChatStateService | Updates active user/group across components |
| Tab navigation | selectedTab property | Switches between Users and Groups lists |
Next Steps
Conversations
Display and manage conversation lists.
Groups
Display and manage group lists.
All Guides
Browse all feature and formatter guides.
Sample App
Full working sample application on GitHub.