import React, { useState, useEffect, forwardRef } 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 }) { 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); const changeHandler = value => { setConversation(prevState => ({ ...prevState, toneStyle: value })); }; const { toneStyle } = conversation; const cardStyle = 'shadow-md rounded-md min-w-[75px] font-normal bg-white border-black/10 border dark:bg-gray-700 text-black dark:text-white'; 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; // return (
{'Creative'} {'Fast'} {'Balanced'} {'Precise'}
); } export default BingAIOptions;