mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 15:31:05 +08:00
Fix: Add a waiting status to the messages on the chat page. (#15773)
### What problem does this PR solve? Fix: Add a waiting status to the messages on the chat page. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -10,6 +10,7 @@ import { memo, useCallback, useMemo } from 'react';
|
||||
|
||||
import { IRegenerateMessage, IRemoveMessageById } from '@/hooks/logic-hooks';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { isEmpty } from 'lodash';
|
||||
import { DocumentDownloadButton } from '../document-download-button';
|
||||
import MarkdownContent from '../markdown-content';
|
||||
import { ReferenceDocumentList } from '../next-message-item/reference-document-list';
|
||||
@@ -134,7 +135,7 @@ const MessageItem = ({
|
||||
></UserGroupButton>
|
||||
)}
|
||||
{/* Show message content if there's any text besides the download */}
|
||||
{messageContent && (
|
||||
{(messageContent || sendLoading) && (
|
||||
<div
|
||||
className={cn(
|
||||
isAssistant
|
||||
@@ -145,12 +146,16 @@ const MessageItem = ({
|
||||
{ '!bg-bg-card': !isAssistant },
|
||||
)}
|
||||
>
|
||||
<MarkdownContent
|
||||
loading={loading}
|
||||
content={messageContent}
|
||||
reference={reference}
|
||||
clickDocumentButton={clickDocumentButton}
|
||||
></MarkdownContent>
|
||||
{sendLoading && isEmpty(messageContent) ? (
|
||||
'running...'
|
||||
) : (
|
||||
<MarkdownContent
|
||||
loading={loading}
|
||||
content={messageContent}
|
||||
reference={reference}
|
||||
clickDocumentButton={clickDocumentButton}
|
||||
></MarkdownContent>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{isAssistant && (
|
||||
|
||||
Reference in New Issue
Block a user