import ReactMarkdown from 'react-markdown'; import { Anchor, Blockquote, Code, List, Text, Title } from '@mantine/core'; import { StreamingText } from './StreamingText'; import classes from './MarkdownMessage.module.css'; interface MarkdownMessageProps { content: string; isStreaming?: boolean; } export function MarkdownMessage({ content, isStreaming = false }: MarkdownMessageProps) { // While streaming, render plain text with fade-in animation // Once done, render full markdown if (isStreaming) { return (
{children};
}
return (
{children}
);
},
pre: ({ children }) => {children}, strong: ({ children }) => (