feat: add Markdown rendering to text segments

- Add react-markdown + remark-gfm for GFM-compatible markdown rendering
- Create MarkdownRenderer component with custom Tailwind-styled elements
- Update TextSegmentView to render markdown instead of plain text
- Update LongTextView to render markdown when expanded
- Fix Lucide icon type in DocumentCard
This commit is contained in:
carry
2026-06-07 13:53:57 +08:00
parent 241156853c
commit fec598af62
7 changed files with 1653 additions and 19 deletions
+3 -1
View File
@@ -12,7 +12,9 @@
"dependencies": {
"lucide-react": "^0.400.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react-dom": "^18.3.1",
"react-markdown": "^10.1.0",
"remark-gfm": "^4.0.1"
},
"devDependencies": {
"@types/react": "^18.3.3",