import { Button, Spinner, InputGroup, InputRightElement, Icon, HStack } from "@chakra-ui/react"; import { IoMdSend } from "react-icons/io"; import AutoResizeTextArea from "../AutoResizeTextArea"; export const CustomInstructionsInput = ({ instructions, setInstructions, loading, onSubmit, }: { instructions: string; setInstructions: (instructions: string) => void; loading: boolean; onSubmit: () => void; }) => { return ( setInstructions(e.target.value)} onKeyDown={(e) => { if (e.key === "Enter" && !e.metaKey && !e.ctrlKey && !e.shiftKey) { e.preventDefault(); e.currentTarget.blur(); onSubmit(); } }} placeholder="Send custom instructions" py={4} pl={4} pr={12} colorScheme="orange" borderColor="gray.300" borderWidth={1} _hover={{ borderColor: "gray.300", }} _focus={{ borderColor: "gray.300", }} isDisabled={loading} /> ); };