mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-04 22:13:08 +00:00
Extend the artifact sidebar with a document/file view: a version selector, authenticated download honoring Content-Disposition (following the backend redirect to a presigned URL when configured), and version restore. Preview is chosen by kind - html, svg, and mermaid render inside a sandboxed iframe with a restrictive CSP (mermaid via its own sandboxed render so untrusted diagram text never reaches the app DOM), office documents and PDFs show a download card, and code or data render as text. Wires the new artifact endpoints into the API service and leaves the existing notes/todo path unchanged.