Allow multiline instructions

This commit is contained in:
David Corbitt
2023-07-19 18:10:04 -07:00
parent f797fc3fa4
commit eec894e101

View File

@@ -12,7 +12,6 @@ import {
Spinner, Spinner,
HStack, HStack,
InputGroup, InputGroup,
Input,
InputRightElement, InputRightElement,
Icon, Icon,
} from "@chakra-ui/react"; } from "@chakra-ui/react";
@@ -22,6 +21,7 @@ import { useHandledAsyncCallback } from "~/utils/hooks";
import { type PromptVariant } from "@prisma/client"; import { type PromptVariant } from "@prisma/client";
import { useState } from "react"; import { useState } from "react";
import CompareFunctions from "./CompareFunctions"; import CompareFunctions from "./CompareFunctions";
import AutoResizeTextArea from "../AutoResizeTextArea";
export const RefinePromptModal = ({ export const RefinePromptModal = ({
variant, variant,
@@ -73,7 +73,7 @@ export const RefinePromptModal = ({
alignItems="center" alignItems="center"
colorScheme="orange" colorScheme="orange"
> >
<Input <AutoResizeTextArea
value={instructions} value={instructions}
onChange={(e) => setInstructions(e.target.value)} onChange={(e) => setInstructions(e.target.value)}
onKeyDown={(e) => { onKeyDown={(e) => {
@@ -84,8 +84,9 @@ export const RefinePromptModal = ({
} }
}} }}
placeholder="Send instructions" placeholder="Send instructions"
py={7} py={4}
px={4} pl={4}
pr={12}
colorScheme="orange" colorScheme="orange"
borderColor="gray.300" borderColor="gray.300"
borderWidth={1} borderWidth={1}