diff --git a/client/src/components/Input/BingAIOptions/index.jsx b/client/src/components/Input/BingAIOptions/index.jsx index c17a125334..b1f5783455 100644 --- a/client/src/components/Input/BingAIOptions/index.jsx +++ b/client/src/components/Input/BingAIOptions/index.jsx @@ -1,38 +1,16 @@ -import React, { useState, useEffect, forwardRef } from 'react'; +import React from 'react'; import { useRecoilValue, useRecoilState } from 'recoil'; import { cn } from '~/utils'; -import { Button } from '../../ui/Button.tsx'; import { Tabs, TabsList, TabsTrigger } from '../../ui/Tabs.tsx'; import store from '~/store'; -// function BingStyles(props, ref) { -// const [conversation, setConversation] = useRecoilState(store.conversation) || {}; -// const { endpoint, conversationId, jailbreak, toneStyle } = conversation; -// const messages = useRecoilValue(store.messages); - -// const isBing = endpoint === 'bingAI'; - -// const show = isBing && (!conversationId || messages?.length === 0 || props.show); -// const defaultClasses = -// 'p-2 rounded-md min-w-[75px] font-normal bg-white/[.60] dark:bg-gray-700 text-black text-xs'; -// const defaultSelected = cn(defaultClasses, 'font-medium data-[state=active]:text-white text-xs text-white'); - -// const selectedClass = val => val + '-tab ' + defaultSelected; - -// const changeHandler = value => { -// setConversation(prevState => ({ ...prevState, toneStyle: value })); -// }; - -function BingAIOptions({ ref }) { +function BingAIOptions() { const [conversation, setConversation] = useRecoilState(store.conversation) || {}; - const messages = useRecoilValue(store.messages); const { endpoint, conversationId } = conversation; if (endpoint !== 'bingAI') return null; - - const isBing = endpoint === 'bingAI'; - const show = isBing && (!conversationId || messages?.length === 0); + if (conversationId !== 'new') return null; const changeHandler = value => { setConversation(prevState => ({ ...prevState, toneStyle: value })); @@ -47,16 +25,6 @@ function BingAIOptions({ ref }) { const defaultSelected = cn(defaultClasses, 'font-medium data-[state=active]:text-white text-xs text-white'); const selectedClass = val => val + '-tab ' + defaultSelected; - // return (
setAdvancedMode(prev => !prev); @@ -47,6 +47,7 @@ function OpenAIOptions() { }, [conversation, advancedMode]); if (endpoint !== 'openAI') return null; + if (conversationId !== 'new') return null; const { model } = conversation; @@ -83,22 +84,28 @@ function OpenAIOptions() {
-
- Advanced settings for OpenAI endpoint - +
+
+ Advanced settings for OpenAI endpoint + +
+
content
-
content
); diff --git a/client/src/components/Input/index.jsx b/client/src/components/Input/index.jsx index 5a25db5efe..c33e230da3 100644 --- a/client/src/components/Input/index.jsx +++ b/client/src/components/Input/index.jsx @@ -130,25 +130,9 @@ export default function TextChat({ isSearchView = false }) { <>
- {/* - { : latestMessage && !latestMessage?.isCreatedByUser ? ( - - ) : null} - */} - {/* */}