import React, { useState } from 'react'; import TextareaAutosize from 'react-textarea-autosize'; import { Input } from '~/components/ui/Input.tsx'; import { Label } from '~/components/ui/Label.tsx'; import { Checkbox } from '~/components/ui/Checkbox.tsx'; import Dropdown from '~/components/ui/Dropdown'; import { cn } from '~/utils/'; // import ModelDropDown from '../../ui/ModelDropDown'; // import { Slider } from '~/components/ui/Slider.tsx'; // import OptionHover from './OptionHover'; // import { HoverCard, HoverCardTrigger } from '~/components/ui/HoverCard.tsx'; const defaultTextProps = 'rounded-md border border-gray-200 focus:border-slate-400 focus:bg-gray-50 bg-transparent text-sm shadow-[0_0_10px_rgba(0,0,0,0.05)] outline-none placeholder:text-gray-400 focus:outline-none focus:ring-gray-400 focus:ring-opacity-20 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-500 dark:bg-gray-700 focus:dark:bg-gray-600 dark:text-gray-50 dark:shadow-[0_0_15px_rgba(0,0,0,0.10)] dark:focus:border-gray-400 dark:focus:outline-none dark:focus:ring-0 dark:focus:ring-gray-400 dark:focus:ring-offset-0'; const optionText = 'p-0 shadow-none text-right pr-1 h-8 border-transparent focus:ring-[#10a37f] focus:ring-offset-0 focus:ring-opacity-100 hover:bg-gray-800/10 dark:hover:bg-white/10 focus:bg-gray-800/10 dark:focus:bg-white/10 transition-colors'; function Settings(props) { const { readonly, context, systemMessage, jailbreak, toneStyle, setOption } = props; const showSystemMessage = jailbreak; const setContext = setOption('context'); const setSystemMessage = setOption('systemMessage'); const setJailbreak = setOption('jailbreak'); // console.log('data', data); return ( <>
setContext(e.target.value || null)} placeholder="Bing can use up to 7k tokens for 'context', text that it can reference per 1 conversation. The specific limit is not known but may run into errors exceeding 7k tokens" className={cn( defaultTextProps, 'flex max-h-[300px] min-h-[100px] w-full resize-none px-3 py-2' )} /> {'Token count: 1200 (work in progress)'}
{ setJailbreak(checked); // setShowSystemMessage(checked); }} />
{showSystemMessage && ( <> {/* */} setSystemMessage(e.target.value || null)} placeholder="WARNING: Misuse of this feature can get you BANNED from using Bing! Click on 'System Message' for full instructions and the default message if omitted, which is the 'Sydney' preset that is considered safe." className={cn( defaultTextProps, 'flex max-h-[300px] min-h-[148px] w-full resize-none px-3 py-2 ' )} /> )}
{/* */}
); } export default Settings;