diff --git a/src/contexts/ConversationLayer.tsx b/src/contexts/ConversationLayer.tsx index b77a630..74b1cd3 100644 --- a/src/contexts/ConversationLayer.tsx +++ b/src/contexts/ConversationLayer.tsx @@ -22,7 +22,6 @@ export const updateLocalUser = (userId: string) => { }; const getConversationTitle = (conversation: Conversation) => { - console.log(conversation?.messages?.[0]?.input_prompt); return conversation?.messages?.[0]?.input_prompt; }; diff --git a/src/contexts/MessagesContext.tsx b/src/contexts/MessagesContext.tsx index c4f815e..7665f14 100644 --- a/src/contexts/MessagesContext.tsx +++ b/src/contexts/MessagesContext.tsx @@ -324,15 +324,20 @@ const MessagesContextProvider = (props: any) => { ); useEffect(() => { - // Load the latest conversation from DB setPreventAutoplay(true); - if (!config?.enableConversations && conversations.length) + if (!layoutController?.showNewConversationButton && conversations.length) + // Load the latest conversation from DB setActiveConversation(conversations[0]); else setMessagesLoading(false); setTimeout(() => { setPreventAutoplay(false); }, 3000); - }, [config, conversations, setActiveConversation]); + }, [ + config, + conversations, + layoutController?.showNewConversationButton, + setActiveConversation, + ]); const valueMessages = { sendPrompt, diff --git a/src/main.tsx b/src/main.tsx index 4f4553a..808cd9d 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,9 +1,8 @@ import GooeyEmbed from "src/lib.tsx"; -GooeyEmbed.mount({ target: "#popup", integration_id: "MqL", mode: "popup", }); -// GooeyEmbed.mount({ -// target: "#inline", -// integration_id: "Wdy", -// mode: "fullscreen", -// // disableConversations: true, -// }); +GooeyEmbed.mount({ target: "#popup", integration_id: "MqL", mode: "popup" }); +GooeyEmbed.mount({ + target: "#inline", + integration_id: "Wdy", + mode: "inline", +});