diff --git a/client/src/components/Input/index.jsx b/client/src/components/Input/index.jsx index a3510affdd..90a11e4eeb 100644 --- a/client/src/components/Input/index.jsx +++ b/client/src/components/Input/index.jsx @@ -33,23 +33,23 @@ export default function TextChat({ isSearchView = false }) { const [showBingToneSetting, setShowBingToneSetting] = useState(false); const isNotAppendable = latestMessage?.unfinished & !isSubmitting || latestMessage?.error; + const { conversationId, jailbreak } = conversation || {}; // auto focus to input, when enter a conversation. useEffect(() => { - const { conversationId } = conversation || {}; if (!conversationId) { return; } // Prevents Settings from not showing on new conversation, also prevents showing toneStyle change without jailbreak - if (conversationId === 'new' || !conversation?.jailbreak) { + if (conversationId === 'new' || !jailbreak) { setShowBingToneSetting(false); } if (conversationId !== 'search') { inputRef.current?.focus(); } - }, [conversation]); + }, [conversationId, jailbreak]); useEffect(() => { const timeoutId = setTimeout(() => { @@ -135,7 +135,7 @@ export default function TextChat({ isSearchView = false }) { return ( <> -
+