feat: add Copy Text and Download .docx buttons to response window

- Copy Text: copies raw markdown to clipboard with visual feedback
- Download .docx: converts markdown to a properly formatted Word
  document using the docx library (headings, bold/italic, lists,
  tables, blockquotes, links, horizontal rules)
- Both buttons appear below the response article after streaming ends
- docx/file-saver are lazy-loaded (dynamic import) so they don't
  bloat the initial bundle (~308 KB main vs ~407 KB docx chunk)

Co-Authored-By: alex <alex@semipublic.co>
This commit is contained in:
Devin AI
2026-05-15 13:30:38 +00:00
parent d8e8fb1d3f
commit 94d4ba90d3
4 changed files with 557 additions and 11 deletions
+2
View File
@@ -10,6 +10,8 @@
"preview": "vite preview"
},
"dependencies": {
"docx": "^9.6.1",
"file-saver": "^2.0.5",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-markdown": "^9.0.1",