From f50eb75b8e07e0ef52ed8888cd091229a2f6ba5b Mon Sep 17 00:00:00 2001 From: anish-work Date: Thu, 5 Sep 2024 16:12:59 +0530 Subject: [PATCH] chores --- src/contexts/ConversationLayer.tsx | 1 - src/contexts/MessagesContext.tsx | 11 ++++++++--- src/main.tsx | 13 ++++++------- 3 files changed, 14 insertions(+), 11 deletions(-) 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", +});