fix: message input box reflow (#252)

This commit is contained in:
JeffJiang 2025-05-28 16:38:28 +08:00 committed by GitHub
parent 56e35c6b7f
commit 9888098f8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,13 +15,13 @@ import {
} from "novel"; } from "novel";
import { Markdown } from "tiptap-markdown"; import { Markdown } from "tiptap-markdown";
import { useDebouncedCallback } from "use-debounce"; import { useDebouncedCallback } from "use-debounce";
import { cx } from "class-variance-authority";
import "~/styles/prosemirror.css"; import "~/styles/prosemirror.css";
import { resourceSuggestion } from "./resource-suggestion"; import { resourceSuggestion } from "./resource-suggestion";
import React, { forwardRef, useMemo, useRef } from "react"; import React, { forwardRef, useMemo, useRef } from "react";
import type { Resource } from "~/core/messages"; import type { Resource } from "~/core/messages";
import { useRAGProvider } from "~/core/api/hooks"; import { useRAGProvider } from "~/core/api/hooks";
import { LoadingOutlined } from "@ant-design/icons";
export interface MessageInputRef { export interface MessageInputRef {
focus: () => void; focus: () => void;
@ -152,7 +152,11 @@ const MessageInput = forwardRef<MessageInputRef, MessageInputProps>(
}, [onEnter, provider]); }, [onEnter, provider]);
if (loading) { if (loading) {
return null; return (
<div className={className}>
<LoadingOutlined />
</div>
);
} }
return ( return (