Skip to main content

Overview

CometChatAIAssistantChatHistory is a pre-built user interface element designed to display the conversation history between users and an AI assistant within a chat application. It provides a structured and visually appealing way to present past interactions, making it easy for users to review previous messages and context.

Usage

Integration

CometChatAIAssistantChatHistory, as a Composite Component, offers flexible integration options, allowing it to be launched directly via button clicks or any user-triggered action. The following code snippet exemplifies how you can seamlessly integrate the AI Assistant Chat History component into your application.
If you’re defining the User within the component, you’ll need to ensure the user has the appropriate role set to use AI Assistant features.

Actions

Actions dictate how a component functions. They are divided into two types: Predefined and User-defined. You can override either type, allowing you to tailor the behavior of the component to fit your specific needs.
onMessageClicked
Function invoked when a chat history item is clicked, typically used to open an AI assistant chat screen.

onNewChatButtonClick
Function triggered when the new chat button is clicked, typically used to start a new conversation with the AI assistant.

onClose
Function activated when the close button is clicked, usually to exit the chat history view.

onError
Function invoked when an error occurs during message fetching or any other operation.

Customization

To fit your app’s design requirements, you can customize the appearance of the AI Assistant Chat History component. These customizations are categorized into two main areas: Style and Functionality.

Style

Using Style you can customize the look and feel of the component in your app. These parameters typically control elements such as the color, size, shape, and fonts used within the component.

Functionality

These are a set of small functional customizations that allow you to fine-tune the overall experience of the component. With these, you can control various aspects of the component’s behavior. Below is a list of customizations along with corresponding code snippets:

Next Steps

Message List

Display the list of messages in a conversation

AI Features

Overview of all AI-powered features

Conversations

Display and manage the list of recent chats

Component Styling

Customize the appearance of UI Kit components