feat: Conditionally hide thinking loader for paused messages (#1875)

Co-authored-by: lizhixuan <zhixuan.li@banosuperapp.com>
This commit is contained in:
MyPrototypeWhat 2025-02-18 11:10:48 +08:00 committed by GitHub
parent c94450db44
commit f99851fb6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,6 +33,7 @@ const MessageThought: FC<Props> = ({ message }) => {
const thinkingTime = message.metrics?.time_thinking_millsec || 0
const thinkingTimeSeconds = (thinkingTime / 1000).toFixed(1)
const isPaused = message.status === 'paused'
return (
<CollapseContainer
@ -48,7 +49,7 @@ const MessageThought: FC<Props> = ({ message }) => {
<TinkingText>
{isThinking ? t('chat.thinking') : t('chat.deeply_thought', { secounds: thinkingTimeSeconds })}
</TinkingText>
{isThinking && <BarLoader color="#9254de" />}
{isThinking && !isPaused && <BarLoader color="#9254de" />}
</MessageTitleLabel>
),
children: (