Skip to main content

Module export

Module export 

Source
Expand description

Export conversation sessions to standalone HTML files.

Produces a self-contained HTML document with embedded CSS and JS that renders a conversation session with:

  • Color-coded user / assistant / system messages
  • Markdown → HTML rendering (basic, no external deps)
  • Tool calls and results in styled blocks
  • Collapsible thinking blocks
  • Metadata header (model, provider, date, token counts)
  • Dark theme (default) with light-theme toggle
  • Syntax highlighting for code blocks (JS-only, via highlight.js CDN)
  • Session tree navigation for branched sessions

Structs§

ExportMeta
Metadata attached to an export (optional but encouraged).
TreeNode
A single rendered node in the session tree.

Functions§

export_html
Render a flat list of session entries into a self-contained HTML string.