From af4110ff15225fbd9f045e1354cec73fbdc25b9f Mon Sep 17 00:00:00 2001 From: Hyunggyu Jang Date: Sun, 26 Mar 2023 13:24:20 +0900 Subject: [PATCH] Do not allow to override bing AI tone in the middle of conversation --- client/src/components/Main/BingStyles.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/Main/BingStyles.jsx b/client/src/components/Main/BingStyles.jsx index ee2cd85f2a..df87033cea 100644 --- a/client/src/components/Main/BingStyles.jsx +++ b/client/src/components/Main/BingStyles.jsx @@ -12,10 +12,10 @@ function BingStyles(props, ref) { const isBing = model === 'bingai' || model === 'sydney'; useEffect(() => { - if (isBing) { + if (model === 'bingai' && !conversationId || model === 'sydney') { dispatch(setConversation({ toneStyle: value })); } - }, [isBing, conversationId, model, value, dispatch]); + }, [conversationId, model, value, dispatch]); const show = isBing && ((!conversationId || messages?.length === 0) || props.show); const defaultClasses = 'p-2 rounded-md font-normal bg-white/[.60] dark:bg-gray-700 text-black';