@@ -18,7 +18,6 @@ import {
1818 SpecialTags ,
1919} from '@/app/workspace/[workspaceId]/home/components/message-content/components/special-tags'
2020import type { MothershipResource } from '@/app/workspace/[workspaceId]/home/types'
21- import { useStreamingReveal } from '@/hooks/use-streaming-reveal'
2221import { useStreamingText } from '@/hooks/use-streaming-text'
2322
2423const LANG_ALIASES : Record < string , string > = {
@@ -264,11 +263,6 @@ export function ChatContent({
264263 const parsed = useMemo ( ( ) => parseSpecialTags ( rendered , isStreaming ) , [ rendered , isStreaming ] )
265264 const hasSpecialContent = parsed . hasPendingTag || parsed . segments . some ( ( s ) => s . type !== 'text' )
266265
267- const { committed, incoming, generation } = useStreamingReveal (
268- rendered ,
269- ! hasSpecialContent && isStreaming
270- )
271-
272266 if ( hasSpecialContent ) {
273267 type BlockSegment = Exclude <
274268 ContentSegment ,
@@ -336,38 +330,14 @@ export function ChatContent({
336330 }
337331
338332 return (
339- < div >
340- { committed && (
341- < div
342- className = { cn (
343- PROSE_CLASSES ,
344- '[&>:first-child]:mt-0' ,
345- ! incoming && '[&>:last-child]:mb-0'
346- ) }
347- >
348- < Streamdown mode = 'static' components = { MARKDOWN_COMPONENTS } >
349- { committed }
350- </ Streamdown >
351- </ div >
352- ) }
353- { incoming && (
354- < div
355- key = { generation }
356- className = { cn (
357- PROSE_CLASSES ,
358- '[&>:first-child]:mt-0 [&>:last-child]:mb-0' ,
359- isStreaming && 'animate-stream-fade-in'
360- ) }
361- >
362- < Streamdown
363- mode = { isStreaming ? undefined : 'static' }
364- isAnimating = { isStreaming }
365- components = { MARKDOWN_COMPONENTS }
366- >
367- { incoming }
368- </ Streamdown >
369- </ div >
370- ) }
333+ < div className = { cn ( PROSE_CLASSES , '[&>:first-child]:mt-0 [&>:last-child]:mb-0' ) } >
334+ < Streamdown
335+ mode = { isStreaming ? undefined : 'static' }
336+ isAnimating = { isStreaming }
337+ components = { MARKDOWN_COMPONENTS }
338+ >
339+ { rendered }
340+ </ Streamdown >
371341 </ div >
372342 )
373343}
0 commit comments