CometChatConversationSummary component displays an AI-generated conversation summary in a panel with a localized title, close button, and body area. It fetches the summary via a provided callback on initialization, showing a loading shimmer during the fetch, then transitions to loaded, empty, or error state.
Overview
- AI-Generated Summary: Fetches a conversation summary from the CometChat AI extension
- State Management: Signal-based state transitions between loading, loaded, empty, and error
- Localized UI: All text rendered via the
translatepipe - Keyboard Accessible: Close button is operable via Enter and Space keys
- OnPush Change Detection: Efficient rendering with
ChangeDetectionStrategy.OnPush
Live Preview — default conversation summary preview.
Open in Storybook ↗
Basic Usage
Properties
| Property | Type | Default | Description |
|---|---|---|---|
getConversationSummary | () => Promise<string> | undefined | Callback that fetches the conversation summary. Returns a Promise resolving to the summary text. |
closeCallback | () => void | undefined | Callback invoked when the close button is clicked to dismiss the panel. |
Events
This component does not emit any@Output() events. Interaction is handled via the closeCallback input.
Customization
Styling with CSS Variables
The component uses BEM-named CSS classes prefixed withcometchat-conversation-summary and references standard CometChat CSS variables for theming: