mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-03-19 03:43:08 +00:00
feat: add full markdown rendering to chat messages
Replace the custom BOLD_REGEX parser in ChatMessage.tsx with react-markdown + remark-gfm for proper rendering of headers, tables, lists, code blocks, blockquotes, links, and horizontal rules in all chat UIs (AssistantChat, SpecCreationChat, ExpandProjectChat). Changes: - Add react-markdown and remark-gfm dependencies - Add vendor-markdown chunk to Vite manual chunks for code splitting - Add .chat-prose CSS class with styles for all markdown elements - Add .chat-prose-user modifier for contrast on primary-colored bubbles - Replace line-splitting + regex logic with ReactMarkdown component - Links open in new tabs via custom component override - System messages remain plain text (unchanged) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,8 @@ export default defineConfig({
|
||||
'@radix-ui/react-slot',
|
||||
'@radix-ui/react-switch',
|
||||
],
|
||||
// Markdown rendering
|
||||
'vendor-markdown': ['react-markdown', 'remark-gfm'],
|
||||
// Icons and utilities
|
||||
'vendor-utils': [
|
||||
'lucide-react',
|
||||
|
||||
Reference in New Issue
Block a user