Skip to content

Commit 81e5700

Browse files
Update Markdown.tsx
1 parent ebc06a2 commit 81e5700

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

app/components/chat/Markdown.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { createScopedLogger } from '~/utils/logger';
55
import { rehypePlugins, remarkPlugins, allowedHTMLElements } from '~/utils/markdown';
66
import { Artifact } from './Artifact';
77
import { ThinkingArtifact } from './ThinkingArtifact';
8+
import { TestArtifact } from './TestArtifact';
89
import { CodeBlock } from './CodeBlock';
910
import { ThinkingProcess } from './ThinkingProcess';
1011

@@ -45,6 +46,16 @@ export const Markdown = memo(({ children, html = false, limitedMarkdown = false
4546
return <ThinkingArtifact messageId={messageId} />;
4647
}
4748

49+
if (className?.includes('__testArtifact__')) {
50+
const messageId = node?.properties.dataMessageId as string;
51+
52+
if (!messageId) {
53+
logger.error(`Invalid message id ${messageId}`);
54+
}
55+
56+
return <TestArtifact messageId={messageId} />;
57+
}
58+
4859
if (className?.includes('__codinitThought__')) {
4960
return <ThoughtBox title="Thought process">{children}</ThoughtBox>;
5061
}

0 commit comments

Comments
 (0)