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 e5ace39a75
commit 4c6cc4140c

View File

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