From 711e0d3493738427e5ed75fd2b5fcd12ced03147 Mon Sep 17 00:00:00 2001 From: josc146 Date: Sat, 23 Sep 2023 16:52:00 +0800 Subject: [PATCH] patch: decisionCard and popupCard of bing client (#505) --- src/components/ConversationCard/index.jsx | 2 +- src/content-script/index.jsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/ConversationCard/index.jsx b/src/components/ConversationCard/index.jsx index 16d3d41..32ccf4d 100644 --- a/src/components/ConversationCard/index.jsx +++ b/src/components/ConversationCard/index.jsx @@ -101,7 +101,7 @@ function ConversationCard(props) { useEffect(async () => { // when the page is responsive, session may accumulate redundant data and needs to be cleared after remounting and before making a new request if (props.question) { - const newSession = initSession({ question: props.question }) + const newSession = initSession({ ...session, question: props.question }) setSession(newSession) await postMessage({ session: newSession }) } diff --git a/src/content-script/index.jsx b/src/content-script/index.jsx index a08e684..e39133b 100644 --- a/src/content-script/index.jsx +++ b/src/content-script/index.jsx @@ -73,7 +73,7 @@ async function mountComponent(siteConfig, userConfig) { container.id = 'chatgptbox-container' render( { toolbarContainer.remove() } -const createSelectionTools = (toolbarContainer, selection) => { +const createSelectionTools = async (toolbarContainer, selection) => { toolbarContainer.className = 'chatgptbox-toolbar-container' render(