Skip to content

feat(chat): render referenced media inline - #404

Open
0xSero wants to merge 2 commits into
devfrom
feat/response-media-previews
Open

feat(chat): render referenced media inline#404
0xSero wants to merge 2 commits into
devfrom
feat/response-media-previews

Conversation

@0xSero

@0xSero 0xSero commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • render local PNG, JPEG, GIF, WebP, AVIF, BMP, ICO, APNG, and SVG references inline in assistant responses
  • render referenced MP4, MOV, WebM, OGV, MP3, WAV, M4A, AAC, FLAC, OGG, and Opus files with native video/audio controls
  • recognize Markdown images, Markdown links, inline-code paths, and plain media paths while leaving remote images hidden
  • stream authenticated local files with byte-range support and constrain direct SVG documents with a restrictive CSP

Validation

  • npm run check
  • 139 frontend tests, 90 controller tests, and 97 agent-runtime tests passed
  • browser acceptance: PNG and SVG loaded at intrinsic dimensions; MP4 and WAV reached readyState 4 and duration 1s through 206 responses

}
const start = range?.start ?? 0;
const end = range?.end ?? Math.max(0, size - 1);
const stream = size > 0 ? Readable.toWeb(createReadStream(filePath, { start, end })) : null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants