diff --git a/ui-kit/react-native/message-list.mdx b/ui-kit/react-native/message-list.mdx index b05f327a6..c7d45a537 100644 --- a/ui-kit/react-native/message-list.mdx +++ b/ui-kit/react-native/message-list.mdx @@ -61,6 +61,7 @@ description: "Scrollable list of sent and received messages with text, media, re "alignment": { "type": "MessageListAlignmentType", "values": ["leftAligned", "standard"], "default": "standard" }, "scrollToBottomOnNewMessage": { "type": "boolean", "default": false }, "startFromUnreadMessages": { "type": "boolean", "default": false }, + "loadLastAgentConversation": { "type": "boolean", "default": false, "note": "Loads the most recent existing agent conversation on start" }, "streamingSpeed": { "type": "number", "default": "undefined", "note": "AI response streaming speed in ms" } }, "sound": { @@ -672,6 +673,23 @@ function NavigateToMessage() { } ``` +### Load last agent conversation + +Resume the most recent AI agent conversation on start: + +```tsx lines +import { CometChatMessageList } from "@cometchat/chat-uikit-react-native"; + +function AgentChat() { + return ( + + ); +} +``` + --- ## Styling @@ -1039,6 +1057,17 @@ Hides the translate message option. --- +### loadLastAgentConversation + +Automatically loads the most recent agent conversation when set to `true`. + +| | | +| --- | --- | +| Type | `boolean` | +| Default | `false` | + +--- + ### LoadingView Custom component displayed during the loading state.