mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-25 18:26:48 +08:00
44
This commit is contained in:
@@ -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 <TextareaAutosize {...props} />;
|
||||
}
|
||||
|
||||
const Markdown = dynamic(
|
||||
async () => memo((await import("./markdown")).Markdown),
|
||||
{
|
||||
@@ -668,6 +679,7 @@ export function Chat(props: {
|
||||
<div className={styles["chat-input-panel-inner"]}>
|
||||
<TextareaAutosize
|
||||
enterKeyHint="send"
|
||||
autoComplete="on"
|
||||
ref={inputRef}
|
||||
className={styles["chat-input"]}
|
||||
placeholder={Locale.Chat.Input(submitKey)}
|
||||
|
||||
Reference in New Issue
Block a user