Skip to content

Commit

Permalink
chores
Browse files Browse the repository at this point in the history
  • Loading branch information
anish-work committed Sep 5, 2024
1 parent f1b4eb6 commit f50eb75
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/contexts/ConversationLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
11 changes: 8 additions & 3 deletions src/contexts/MessagesContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
13 changes: 6 additions & 7 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -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",
});

0 comments on commit f50eb75

Please sign in to comment.