mirror of https://github.com/langgenius/dify.git
fix: Don't hide chat streaming loader on '\n' content (#26829)
This commit is contained in:
parent
c71fd7113c
commit
c6a90d4bb3
|
|
@ -111,6 +111,8 @@ const Answer: FC<AnswerProps> = ({
|
|||
}
|
||||
}, [switchSibling, item.prevSibling, item.nextSibling])
|
||||
|
||||
const contentIsEmpty = content.trim() === ''
|
||||
|
||||
return (
|
||||
<div className='mb-2 flex last:mb-0'>
|
||||
<div className='relative h-10 w-10 shrink-0'>
|
||||
|
|
@ -153,14 +155,14 @@ const Answer: FC<AnswerProps> = ({
|
|||
)
|
||||
}
|
||||
{
|
||||
responding && !content && !hasAgentThoughts && (
|
||||
responding && contentIsEmpty && !hasAgentThoughts && (
|
||||
<div className='flex h-5 w-6 items-center justify-center'>
|
||||
<LoadingAnim type='text' />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
{
|
||||
content && !hasAgentThoughts && (
|
||||
!contentIsEmpty && !hasAgentThoughts && (
|
||||
<BasicContent item={item} />
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue