Files
hermes-ui/packages
Jack 586776998b
Build / build (push) Waiting to run
Playwright / e2e (push) Waiting to run
feat(chat): render <details>/<summary> blocks as collapsible sections
markdown-it runs with html: false, so raw HTML in a message body is
escaped and shown as literal text. Agents legitimately use
<details>/<summary> to hide the long tail of a reply, and it rendered
as a wall of visible tags.

MarkdownRenderer now splits the message into plain segments and
<details> blocks, renders the plain segments through markdown-it as
before, and builds real <details> elements from the blocks. Nested
blocks are handled by recursion; an unclosed tag does not swallow the
rest of the message.

The html option stays false on purpose: enabling it would let model
output inject arbitrary markup into v-html. Every fragment still goes
through markdown-it, so nothing unsanitised reaches the DOM.

Group chat shares this component, so it picks the change up too.
2026-11-04 23:48:21 +08:00
..