feat(webui): migrate message components with optimizations

- Migrate MarkdownRenderer, MessageContent, UserMessage, ThinkingMessage
- Add useMemo/useCallback for performance optimization
- Fix external link false positive using KNOWN_FILE_EXTENSIONS
- Fix line number display logic (support line 0 and start-only)
- Improve accessibility: use native button, add aria-hidden
- Add React.memo to MessageContent
- Add markdown-it dependency to webui package
This commit is contained in:
yiliang114 2026-01-15 21:33:45 +08:00
parent 71570540cc
commit a78cfc572b
12 changed files with 172 additions and 179 deletions

View file

@ -40,7 +40,11 @@
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"dependencies": {
"markdown-it": "^14.1.0"
},
"devDependencies": {
"@types/markdown-it": "^14.1.2",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@vitejs/plugin-react": "^4.2.0",