This commit is contained in:
Zacharias-Brohn
2026-01-14 20:54:15 +01:00
parent d6d2d78c2e
commit cadab7aaef
4 changed files with 177 additions and 59 deletions
+4 -2
View File
@@ -4,9 +4,10 @@ import classes from './MarkdownMessage.module.css';
interface MarkdownMessageProps {
content: string;
isStreaming?: boolean;
}
export function MarkdownMessage({ content }: MarkdownMessageProps) {
export function MarkdownMessage({ content, isStreaming = false }: MarkdownMessageProps) {
return (
<div className={classes.markdown}>
<ReactMarkdown
@@ -31,7 +32,7 @@ export function MarkdownMessage({ content }: MarkdownMessageProps) {
{children}
</Title>
),
code: ({ className, children, ...props }) => {
code: ({ className, children }) => {
const isInline = !className;
if (isInline) {
return <Code>{children}</Code>;
@@ -74,6 +75,7 @@ export function MarkdownMessage({ content }: MarkdownMessageProps) {
>
{content}
</ReactMarkdown>
{isStreaming && <span className={classes.streamingCursor} />}
</div>
);
}