From a21ddd7aa31180377479946d45a5558491a8d386 Mon Sep 17 00:00:00 2001 From: "[witbox2018]" <103164430@qq.com> Date: Fri, 7 Apr 2023 17:27:50 +0800 Subject: [PATCH] 44 --- app/components/chat.tsx | 14 +++++++++++++- package-lock.json | 11 +++++++++++ package.json | 1 + yarn.lock | 9 ++++++++- 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 0aa784aef..d1701336c 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -1,6 +1,9 @@ import { useDebouncedCallback } from "use-debounce"; import { memo, useState, useRef, useEffect, useLayoutEffect } from "react"; -import TextareaAutosize from "react-textarea-autosize"; +// import TextareaAutosize from "react-textarea-autosize"; +import TextareaAutosize, { + TextareaAutosizeProps, +} from "react-textarea-autosize"; import SendWhiteIcon from "../icons/send-white-fill.svg"; import BrainIcon from "../icons/brain.svg"; @@ -43,6 +46,14 @@ import chatStyle from "./chat.module.scss"; import { Input, Modal, showModal, showToast } from "./ui-lib"; import { text } from "stream/consumers"; +interface CustomTextAreaProps extends TextareaAutosizeProps { + enterKeyHint: string; +} + +function CustomTextArea(props: CustomTextAreaProps) { + return ; +} + const Markdown = dynamic( async () => memo((await import("./markdown")).Markdown), { @@ -668,6 +679,7 @@ export function Chat(props: {
=16": version "18.0.31" resolved "https://registry.npmmirror.com/@types/react/-/react-18.0.31.tgz" @@ -4244,7 +4251,7 @@ react-redux@^8.0.4: react-is "^18.0.0" use-sync-external-store "^1.0.0" -react-textarea-autosize@^8.4.1: +react-textarea-autosize@*, react-textarea-autosize@^8.4.1: version "8.4.1" resolved "https://registry.npmmirror.com/react-textarea-autosize/-/react-textarea-autosize-8.4.1.tgz" integrity sha512-aD2C+qK6QypknC+lCMzteOdIjoMbNlgSFmJjCV+DrfTPwp59i/it9mMNf2HDzvRjQgKAyBDPyLJhcrzElf2U4Q==