mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-07 17:18:21 +08:00
Merge branch 'main' into bugfix-0503
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useDebouncedCallback } from "use-debounce";
|
||||
import { memo, useState, useRef, useEffect, useLayoutEffect } from "react";
|
||||
import { useState, useRef, useEffect, useLayoutEffect } from "react";
|
||||
|
||||
import SendWhiteIcon from "../icons/send-white.svg";
|
||||
import BrainIcon from "../icons/brain.svg";
|
||||
@@ -64,12 +64,9 @@ import {
|
||||
useMaskStore,
|
||||
} from "../store/mask";
|
||||
|
||||
const Markdown = dynamic(
|
||||
async () => memo((await import("./markdown")).Markdown),
|
||||
{
|
||||
loading: () => <LoadingIcon />,
|
||||
},
|
||||
);
|
||||
const Markdown = dynamic(async () => (await import("./markdown")).Markdown, {
|
||||
loading: () => <LoadingIcon />,
|
||||
});
|
||||
|
||||
function exportMessages(messages: Message[], topic: string) {
|
||||
const mdText =
|
||||
@@ -394,7 +391,7 @@ export function Chat() {
|
||||
const onPromptSelect = (prompt: Prompt) => {
|
||||
setPromptHints([]);
|
||||
inputRef.current?.focus();
|
||||
setUserInput(prompt.content);
|
||||
setTimeout(() => setUserInput(prompt.content), 60);
|
||||
};
|
||||
|
||||
// auto grow input
|
||||
@@ -728,6 +725,7 @@ export function Chat() {
|
||||
}}
|
||||
fontSize={fontSize}
|
||||
parentRef={scrollRef}
|
||||
defaultShow={i >= messages.length - 10}
|
||||
/>
|
||||
</div>
|
||||
{!isUser && !message.preview && (
|
||||
|
Reference in New Issue
Block a user