ViteHub is still experimental. Expect bugs and breaking changes.

Markdown

Render streaming assistant Markdown with compact chat typography.

AgentMarkdown wraps @comark/vue and applies the vh-typeset vh-typeset-chat defaults. The stylesheet uses block-start spacing, which remains stable while streaming content appends new nodes.

Preview
<AgentMarkdown :value="part.text" :streaming="part.state === 'streaming'" />

Custom components

Pass Comark components and parser options directly:

<AgentMarkdown :value="answer" :components="{ Callout: MyCallout }" :options="{ gfm: true }" />

Styling

Override the package defaults globally or add a class per instance. The base rules deliberately avoid styling application chrome; they cover prose rhythm, headings, lists, links, inline code, code blocks, and blockquotes.

.support-answer {
  --vh-typeset-flow: 1em;
  --vh-typeset-leading: 1.7;
}