Build the export document for already-loaded conversation data — the download-free seam of ExportConversation. Async because HTML-format branding may inline a logo. Exposed publicly so hosts (and tests) can build export content without triggering a browser download.
Optionalscope: ConversationScopeUse ExportConversation. Without scope, exports Main.
Exports the messages of one scope of a conversation (Main, or one fork's path) and downloads the file. In a fork the export header names the fork.
Snapshot the given theme tokens from the live document. Empty/unset tokens are skipped.
mode captures a SPECIFIC palette rather than whatever the app is rendering right
now. Without it, exporting from a dark session bakes dark text onto the export's
white page and the file is unreadable. When the requested mode isn't the active one,
data-theme is flipped on documentElement, read, and restored — all synchronous
within one task, so the browser never paints the intermediate state. Omit mode
to read the live values as-is.
Optionalmode: "light" | "dark"
Set the metadata provider this service should use. When unset, falls back to Metadata.Provider.