Skip to content

Add HTML output to dispatch export #297

Description

@jongio

Problem

dispatch export writes a session as Markdown or JSON. Markdown is good for pasting into an editor, and JSON is good for scripts, but neither is easy to hand to someone who just wants to read a session in a browser. Rendering the Markdown yourself needs a separate tool.

Proposed solution

Add --format html to dispatch export. It writes one self-contained HTML file (inline CSS, no external requests) with the session metadata header and the conversation laid out as readable chat blocks. All content is HTML-escaped so session text cannot inject markup. The output honors --stdout and --out like the existing formats and writes a .html file by default.

Acceptance criteria

  • dispatch export <id> --format html writes a .html file to the exports directory.
  • --stdout prints the HTML and --out <dir> chooses the destination, matching md and json.
  • The HTML is a single self-contained document with no external references.
  • Session and conversation text is HTML-escaped (no raw tag injection from session content).
  • An invalid --format value still returns the existing clear error listing valid formats.
  • README documents the new format and tests cover rendering, escaping, and file extension.

Complexity

M

Priority

Medium

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestideaFeature idea from the idea pipeline

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions