Skip to content

Commit c519b49

Browse files
author
Benjamin
committed
DEVT-50 added markdown and removed refrences
1 parent d0c16b4 commit c519b49

File tree

3 files changed

+675
-5
lines changed

3 files changed

+675
-5
lines changed

app/classroom/[classroomId]/chat/MessageBox.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
sendMessage,
88
} from "@/app/lib/ragflow/chat/chat-client";
99
import { toast } from "@/hooks/use-toast";
10+
import ReactMarkdown from "react-markdown";
1011

1112
function MessageBox(props: {
1213
chatClient: ChatClientWithSession;
@@ -66,7 +67,7 @@ function MessageBox(props: {
6667
}`}
6768
>
6869
<p className="font-medium text-gray-800">
69-
{cleanMessage(aMessage.content)}
70+
<ReactMarkdown>{cleanMessage(aMessage.content)}</ReactMarkdown>
7071
</p>
7172
</div>
7273
))}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"next-themes": "^0.4.6",
3838
"react": "^19.0.0",
3939
"react-dom": "^19.0.0",
40+
"react-markdown": "^10.1.0",
4041
"tailwind-merge": "^3.0.2",
4142
"tailwindcss-animate": "^1.0.7"
4243
},

0 commit comments

Comments
 (0)