From 986dd78073b6a65870124790e120e1933dbd9555 Mon Sep 17 00:00:00 2001 From: Suraj Chauhan Date: Tue, 9 Jun 2026 10:12:22 +0530 Subject: [PATCH 1/2] docs: add loadLastAgentConversation prop to CometChatMessageList - Add prop to AI Quick Reference JSON - Add prop entry in Props section (boolean, default: false) - Enables automatic loading of the most recent agent conversation --- ui-kit/react-native/message-list.mdx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ui-kit/react-native/message-list.mdx b/ui-kit/react-native/message-list.mdx index b05f327a6..78f49ab39 100644 --- a/ui-kit/react-native/message-list.mdx +++ b/ui-kit/react-native/message-list.mdx @@ -71,7 +71,8 @@ description: "Scrollable list of sent and received messages with text, media, re "suggestedMessages": { "type": "string[]", "note": "Predefined prompts for AI assistant chats" }, "aiAssistantTools": { "type": "CometChatAIAssistantTools", "note": "Tool actions for AI assistant" }, "quickReactionList": { "type": "string[]", "default": "predefined reactions" }, - "streamingSpeed": { "type": "number", "default": "undefined", "note": "AI response streaming speed in ms" } + "streamingSpeed": { "type": "number", "default": "undefined", "note": "AI response streaming speed in ms" }, + "loadLastAgentConversation": { "type": "boolean", "default": false, "note": "Automatically load the most recent agent conversation" } }, "viewSlots": { "HeaderView": "({ user, group, id }) => JSX.Element", @@ -1039,6 +1040,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. From ff690f5437721ab68610cfe47c58fa0940d516d0 Mon Sep 17 00:00:00 2001 From: Suraj Chauhan Date: Tue, 9 Jun 2026 15:10:51 +0530 Subject: [PATCH 2/2] docs(ui-kit/react-native): add loadLastAgentConversation prop to MessageList - Add loadLastAgentConversation prop documentation to props table with type, default, and description - Remove duplicate loadLastAgentConversation entry from optional props section - Add new code example demonstrating how to use loadLastAgentConversation to resume recent agent conversations - Consolidate prop definitions to eliminate redundancy and improve documentation clarity --- ui-kit/react-native/message-list.mdx | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/ui-kit/react-native/message-list.mdx b/ui-kit/react-native/message-list.mdx index 78f49ab39..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": { @@ -71,8 +72,7 @@ description: "Scrollable list of sent and received messages with text, media, re "suggestedMessages": { "type": "string[]", "note": "Predefined prompts for AI assistant chats" }, "aiAssistantTools": { "type": "CometChatAIAssistantTools", "note": "Tool actions for AI assistant" }, "quickReactionList": { "type": "string[]", "default": "predefined reactions" }, - "streamingSpeed": { "type": "number", "default": "undefined", "note": "AI response streaming speed in ms" }, - "loadLastAgentConversation": { "type": "boolean", "default": false, "note": "Automatically load the most recent agent conversation" } + "streamingSpeed": { "type": "number", "default": "undefined", "note": "AI response streaming speed in ms" } }, "viewSlots": { "HeaderView": "({ user, group, id }) => JSX.Element", @@ -673,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