Skip to content

Commit 7935b21

Browse files
committed
fix(stream): use barrel imports and remove redundant memo comparator
1 parent 3b543f3 commit 7935b21

File tree

3 files changed

+8
-15
lines changed
  • apps/sim/app

3 files changed

+8
-15
lines changed

apps/sim/app/chat/components/message/message.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { memo, useMemo, useState } from 'react'
44
import { Check, Copy, File as FileIcon, FileText, Image as ImageIcon } from 'lucide-react'
55
import { Tooltip } from '@/components/emcn'
6-
import { StreamingText } from '@/components/ui/streaming-text'
6+
import { StreamingText } from '@/components/ui'
77
import {
88
ChatFileDownload,
99
ChatFileDownloadAll,

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/chat-message/chat-message.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useMemo } from 'react'
2-
import { StreamingIndicator, StreamingText } from '@/components/ui/streaming-text'
2+
import { StreamingIndicator, StreamingText } from '@/components/ui'
33

44
interface ChatAttachment {
55
id: string
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { memo } from 'react'
2-
import { StreamingIndicator, StreamingText } from '@/components/ui/streaming-text'
2+
import { StreamingIndicator, StreamingText } from '@/components/ui'
33
import { CopilotMarkdownRenderer } from '../markdown-renderer'
44

55
export { StreamingIndicator }
@@ -13,17 +13,10 @@ interface SmoothStreamingTextProps {
1313
}
1414

1515
/** Copilot-specific streaming text that renders with CopilotMarkdownRenderer */
16-
export const SmoothStreamingText = memo(
17-
({ content, isStreaming }: SmoothStreamingTextProps) => {
18-
return (
19-
<StreamingText content={content} isStreaming={isStreaming} renderer={renderCopilotMarkdown} />
20-
)
21-
},
22-
(prevProps, nextProps) => {
23-
return (
24-
prevProps.content === nextProps.content && prevProps.isStreaming === nextProps.isStreaming
25-
)
26-
}
27-
)
16+
export const SmoothStreamingText = memo(({ content, isStreaming }: SmoothStreamingTextProps) => {
17+
return (
18+
<StreamingText content={content} isStreaming={isStreaming} renderer={renderCopilotMarkdown} />
19+
)
20+
})
2821

2922
SmoothStreamingText.displayName = 'SmoothStreamingText'

0 commit comments

Comments
 (0)