opencompletion.com/templates
russell@unturf.com 5576179ffa Add comprehensive artifact support for code execution
Implement full artifact support for Unsandbox code execution, enabling
download and inline viewing of generated files (binaries, images, videos).

Backend changes (app.py):
- Update /api/code/execute to accept artifacts parameter
- Add /api/code/artifacts/<path> proxy endpoint for authenticated downloads
- Use SDK's _make_request for full parameter support
- Support artifacts in execution request body

Frontend changes (templates/chat.html):
- Pass artifacts=true in all code execution requests
- Display artifacts section with file info (name, type, size)
- Add download button for all artifact types
- Add view button with inline display for images/videos (disabled for binaries)
- Implement formatFileSize, downloadArtifact, viewArtifact helper functions
- Images and videos render directly in chat
- Text files display in formatted <pre> blocks

Documentation (CLAUDE.md):
- Document artifact support section
- List supported artifact types
- Describe frontend and backend features
- Update frontend integration notes

Artifact types supported:
- Compiled binaries (executables from C, C++, Rust, Go, etc.)
- Images (PNG, JPG, GIF, SVG)
- Videos (MP4, WebM)
- Text/data files (JSON, CSV, TXT)
2026-01-20 08:34:35 -05:00
..
auth.html Redesign user interface across all pages (#42) 2025-11-12 09:24:49 -05:00
base.html Add Open Graph and Twitter Card meta tags for social sharing 2025-12-15 08:17:01 -05:00
browse.html Fix theme flash and add logout to profile page 2025-11-30 10:00:48 -05:00
chat.html Add comprehensive artifact support for code execution 2026-01-20 08:34:35 -05:00
index.html Add Open Graph and Twitter Card meta tags for social sharing 2025-12-15 08:17:01 -05:00
profile.html Fix theme flash and add logout to profile page 2025-11-30 10:00:48 -05:00
search.html Redesign user interface across all pages (#42) 2025-11-12 09:24:49 -05:00