mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-30 18:57:51 +00:00
Generated media often arrives as image markdown (). The chat markdown renderer maps the img element to MarkdownImage, which renders a raw <img>; for a video/audio source the browser cannot paint it and shows a broken-image icon even though the file is valid and plays fine. Images worked only because <img src=...png> is valid markup. Route video/audio sources in MarkdownImage to the existing MediaAttachment, which already picks the correct <video>/<audio> element (streaming protocol + open-externally fallback) by media kind. The intended MEDIA:-tag -> #media: link path is unaffected; this only fixes the bare image-markdown case. Since #57944 the image path is built on hooks (async src resolution, failure and loading states), so the routing check cannot be a plain early return inside it -- it would have to sit after every hook call and would still fire an image resolve for media never rendered as an image. MarkdownImage is therefore a thin hookless router in front of MarkdownImageContent, which is the previous body unchanged. The regression tests join the existing markdown-text.media.test.tsx added by #57944 rather than replacing it. Fixes #40896 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018vU45SEvcxLkVeyyEE9gJ2 |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||