Skip to content

Commit 39779cb

Browse files
committed
Update conversation list component code textarea
1 parent 4395d27 commit 39779cb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

js/samples/basic/index.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,13 @@ <h3 class="text-lg font-medium leading-6 text-gray-900">Conversation List Displa
150150
await messenger.initialize({
151151
appId: 'APP_ID',
152152
aiAgentId: 'AI_AGENT_ID',
153-
// Use Conversation component to display only the messenger without the launcher
154-
customMainComponent: ({ messenger }) => (props) => (
155-
<messenger.AgentProviderContainer {...props}>
156-
<messenger.Conversation />
157-
</messenger.AgentProviderContainer>
158-
),
153+
// Use ConversationList component to display only the conversation list UI without the messenger
154+
// And you can access to the AI Agent Messenger and React instance via first argument
155+
customMainComponent: ({ messenger, react }) => (props) => {
156+
return react.createElement(messenger.AgentProviderContainer, props, [
157+
react.createElement(messenger.ConversationList),
158+
]);
159+
}
159160
});
160161
</textarea>
161162
</div>

0 commit comments

Comments
 (0)