♿ (openai) Show textarea instead of text input for message content
This commit is contained in:
@@ -22,6 +22,7 @@ type Props = {
|
||||
moreInfoTooltip?: string
|
||||
withVariableButton?: boolean
|
||||
isRequired?: boolean
|
||||
placeholder?: string
|
||||
onChange: (value: string) => void
|
||||
} & Pick<TextareaProps, 'minH'>
|
||||
|
||||
@@ -32,8 +33,10 @@ export const Textarea = ({
|
||||
debounceTimeout = 1000,
|
||||
label,
|
||||
moreInfoTooltip,
|
||||
placeholder,
|
||||
withVariableButton = true,
|
||||
isRequired,
|
||||
minH,
|
||||
}: Props) => {
|
||||
const inputRef = useRef<HTMLTextAreaElement | null>(null)
|
||||
const [isTouched, setIsTouched] = useState(false)
|
||||
@@ -89,6 +92,8 @@ export const Textarea = ({
|
||||
value={localValue}
|
||||
onBlur={updateCarretPosition}
|
||||
onChange={(e) => changeValue(e.target.value)}
|
||||
placeholder={placeholder}
|
||||
minH={minH}
|
||||
/>
|
||||
)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DropdownList } from '@/components/DropdownList'
|
||||
import { TextInput } from '@/components/inputs'
|
||||
import { Textarea } from '@/components/inputs'
|
||||
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
|
||||
import { TableListItemProps } from '@/components/TableList'
|
||||
import { Stack } from '@chakra-ui/react'
|
||||
@@ -77,10 +77,11 @@ export const ChatCompletionMessageItem = ({ item, onItemChange }: Props) => {
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
<TextInput
|
||||
<Textarea
|
||||
defaultValue={item.content}
|
||||
onChange={changeSingleMessageContent}
|
||||
placeholder="Content"
|
||||
minH="150px"
|
||||
/>
|
||||
)}
|
||||
</Stack>
|
||||
|
||||
@@ -79,7 +79,7 @@ export const OpenAIChatCompletionSettings = ({
|
||||
items={chatCompletionModels}
|
||||
onItemSelect={updateModel}
|
||||
/>
|
||||
<Accordion allowToggle allowMultiple>
|
||||
<Accordion allowMultiple>
|
||||
<AccordionItem>
|
||||
<AccordionButton>
|
||||
<Text w="full" textAlign="left">
|
||||
|
||||
Reference in New Issue
Block a user