feat(ui): 添加 Markdown 渲染和代码高亮功能

- 新增 CodeBlock 组件,使用 Shiki 语法高亮
- 新增 Markdown 组件,支持 GFM 语法
- AI 消息自动渲染 Markdown,用户消息保持原样
- 代码块支持一键复制和语言标签显示
This commit is contained in:
2025-12-12 17:32:25 +08:00
parent cbbe9c7af1
commit f561687307
6 changed files with 1318 additions and 7 deletions
+3
View File
@@ -33,6 +33,9 @@
"clsx": "^2.1.1",
"framer-motion": "^12.23.26",
"lucide-react": "^0.344.0",
"react-markdown": "^10.1.0",
"remark-gfm": "^4.0.1",
"shiki": "^3.19.0",
"sonner": "^2.0.7",
"tailwind-merge": "^3.4.0"
},