Skip to content

Commit 5d3cdf6

Browse files
committed
fix: restrict markdown rendering to assistant messages only
- Changed condition from 'chat.role !== "user"' to 'chat.role === "assistant"' - Now only assistant messages will be rendered as markdown - User messages and tool messages will display as plain text - Provides better control over which message types use markdown rendering
1 parent 686261d commit 5d3cdf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/message/MessageContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function MessageContent({
5252
);
5353
}
5454

55-
if (renderMarkdown && chat.role !== "user") {
55+
if (renderMarkdown && chat.role === "assistant") {
5656
const MarkdownComponent = MarkdownRenderer;
5757

5858
return (

0 commit comments

Comments
 (0)