diff --git a/apps/web/src/components/ui/typography/AnimatedMarkdown/TokenizedText.tsx b/apps/web/src/components/ui/typography/AnimatedMarkdown/TokenizedText.tsx index c8af97be4..88f624a1b 100644 --- a/apps/web/src/components/ui/typography/AnimatedMarkdown/TokenizedText.tsx +++ b/apps/web/src/components/ui/typography/AnimatedMarkdown/TokenizedText.tsx @@ -7,8 +7,7 @@ type TokenizedTextProps = { animation?: MarkdownAnimation; animationDuration?: number; animationTimingFunction?: 'ease-in-out' | 'ease-in' | 'ease-out' | 'linear'; - doNotAnimateInitialText?: boolean; - isStreamFinished?: boolean; + isStreamFinished?: boolean; }; const TokenizedText: React.FC = React.memo( @@ -17,7 +16,7 @@ const TokenizedText: React.FC = React.memo( animation, animationDuration, animationTimingFunction, - doNotAnimateInitialText, + isStreamFinished }) => { const previousTextRef = useRef(''); @@ -41,11 +40,11 @@ const TokenizedText: React.FC = React.memo( 0 ? 'whitespace-pre-wrap' : ''} - style={doNotAnimateInitialText && index === 0 ? {} : animationStyle}> + style={ animationStyle}> {chunk} ), - [animationStyle, doNotAnimateInitialText] + [animationStyle, ] ); const content = useMemo(() => { diff --git a/apps/web/src/components/ui/typography/AnimatedMarkdown/animation-helpers.tsx b/apps/web/src/components/ui/typography/AnimatedMarkdown/animation-helpers.tsx index 1a81256a2..6c3b3ff4d 100644 --- a/apps/web/src/components/ui/typography/AnimatedMarkdown/animation-helpers.tsx +++ b/apps/web/src/components/ui/typography/AnimatedMarkdown/animation-helpers.tsx @@ -66,9 +66,7 @@ export const animateTokenizedText = ( animationsProps: Pick< AnimatedMarkdownProps, 'animation' | 'animationDuration' | 'animationTimingFunction' | 'isStreamFinished' - > & { - doNotAnimateInitialText?: boolean; - } + > ) => { if (!animationsProps.animation) { return text;