diff --git a/apps/web/src/components/ChatMarkdown.tsx b/apps/web/src/components/ChatMarkdown.tsx index 5104ddced5e6..e16d09e2a370 100644 --- a/apps/web/src/components/ChatMarkdown.tsx +++ b/apps/web/src/components/ChatMarkdown.tsx @@ -1,3 +1,4 @@ +import { memo } from "react"; import type { Components } from "react-markdown"; import ReactMarkdown from "react-markdown"; import rehypeHighlight from "rehype-highlight"; @@ -13,7 +14,7 @@ const markdownComponents: Components = { }, }; -export default function ChatMarkdown({ text }: ChatMarkdownProps) { +function ChatMarkdown({ text }: ChatMarkdownProps) { return (
- Send a message to start the conversation. -
-- {groupLabel} -
- {hasOverflow && ( - - )} -- {workEntry.detail ? ( - <> - {workEntry.label} - - {workEntry.detail} - - > - ) : ( - workEntry.label - )} -
-
- {timelineEntry.message.text}
-
- )}
- - {formatTimestamp(timelineEntry.message.createdAt)} -
-- {formatMessageMeta( - timelineEntry.message.createdAt, - timelineEntry.message.streaming - ? formatElapsed(timelineEntry.message.createdAt, nowIso) - : formatElapsed( - timelineEntry.message.createdAt, - assistantCompletionByItemId.get(timelineEntry.message.id), - ), - )} -
-Send a message to start the conversation.
++ {groupLabel} +
+ {hasOverflow && ( + + )} ++ {workEntry.detail ? ( + <> + {workEntry.label} + + {workEntry.detail} + + > + ) : ( + workEntry.label + )} +
+
+ {timelineEntry.message.text}
+
+ )}
+ + {formatTimestamp(timelineEntry.message.createdAt)} +
++ {formatMessageMeta( + timelineEntry.message.createdAt, + timelineEntry.message.streaming + ? formatElapsed(timelineEntry.message.createdAt, nowIso) + : formatElapsed( + timelineEntry.message.createdAt, + assistantCompletionByItemId.get(timelineEntry.message.id), + ), + )} +
+