mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-25 09:53:29 +08:00
Feat: If the interval between two outputs exceeds 600ms, a loading state is displayed at the end. (#16861)
### Summary Feat: If the interval between two outputs exceeds 600ms, a loading state is displayed at the end.
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
import { MessageType } from '@/constants/chat';
|
||||
import { IRegenerateMessage, IRemoveMessageById } from '@/hooks/logic-hooks';
|
||||
import {
|
||||
IMessage,
|
||||
IReference,
|
||||
IReferenceChunk,
|
||||
UploadResponseDataType,
|
||||
} from '@/interfaces/database/chat';
|
||||
import classNames from 'classnames';
|
||||
import { memo, useCallback, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { IRegenerateMessage, IRemoveMessageById } from '@/hooks/logic-hooks';
|
||||
import { cn } from '@/lib/utils';
|
||||
import classNames from 'classnames';
|
||||
import { isEmpty } from 'lodash';
|
||||
import { memo, useCallback, useMemo } from 'react';
|
||||
import { DocumentDownloadButton } from '../document-download-button';
|
||||
import { LoadingDots } from '../loading-dots';
|
||||
import MarkdownContent from '../markdown-content';
|
||||
import { ReferenceDocumentList } from '../next-message-item/reference-document-list';
|
||||
import { ReferenceImageList } from '../next-message-item/reference-image-list';
|
||||
@@ -54,7 +53,6 @@ const MessageItem = ({
|
||||
visibleAvatar = true,
|
||||
nickname,
|
||||
}: IProps) => {
|
||||
const { t } = useTranslation();
|
||||
const { theme } = useTheme();
|
||||
const isAssistant = item.role === MessageType.Assistant;
|
||||
const isUser = item.role === MessageType.User;
|
||||
@@ -151,7 +149,7 @@ const MessageItem = ({
|
||||
)}
|
||||
>
|
||||
{sendLoading && isEmpty(messageContent) ? (
|
||||
t('common.running')
|
||||
<LoadingDots className="text-text-secondary" />
|
||||
) : (
|
||||
<MarkdownContent
|
||||
loading={loading}
|
||||
|
||||
Reference in New Issue
Block a user