Introduction¶
DeepSeek Harness officially provides session export functionality, producing raw logs (such as session.v3.jsonl.zstd). These are binary, multi-frame Zstandard compressed JSONL data that are not directly readable by humans. dsh-chat-export bridges the gap by rendering the same session logs into human-readable transcripts.
This plugin provides two entry points: a share icon button in the session header (displaying “Export Transcript” on hover) and the /export-md slash command.
Installation¶
Run the following in your terminal:
dsh plugin --profile web add dsh-chat-export
You must restart the dsh web host process after installation to load the new plugin.
Entry Points and Basic Usage¶
Method 1: Session Header Button¶
Open a session and click the “Export Transcript” button in the header. In the pop-up dialog, you can select the format, scope, image strategy, and whether to export thinking blocks, tool calls, etc. The dialog provides a “Preview Start” feature so you can view the beginning of the Markdown output before confirming. After confirming, you can choose “Browser Download” or “Save to Directory”.
Method 2: Slash Command¶
Type the command directly in the dialog box. It generates Markdown format by default.
/export-md
Command Parameters¶
The command supports various formats and options, which are passed into the dialog for confirmation.
Format¶
md/markdown: Markdown format (default).html: Self-contained HTML, suitable for printing to PDF.txt/text/plain: Plain text without any markup.zip: A packaged file containing md + html + txt + images +meta.json.
Common Options¶
--thinking/--no-thinking: Whether to include thinking blocks (enabled by default).--images=auto|embed|assets|none: Image strategy.automeans inline embedding for single files, and placing inassets/for ZIP.--save[=dir]: Save to a directory instead of downloading. If no directory is specified,dsh-chat-exports/under the session’s working directory is used.--surface: Only export the current model context (default is full log).
Features¶
- Selectable Scope: Supports “Full Log” and “Current Context Only”.
- Attachment Deduplication: Duplicate image attachments appearing in the session are stored only once.
- Bilingual Support: The interface follows DSH language settings.
- Zero Runtime Dependencies: Introduces no
@deepseek-ai/*dependencies; services are obtained via the cordis context. - Hot Module Replacement (HMR): Browser-side code supports HMR, allowing changes without refreshing the page.
- Preview Before Export: Directly preview the beginning of the exported content within the dialog.
Output Format and Limitations¶
Output Content¶
The exported transcript includes user/assistant messages, thinking blocks (collapsible), tool calls and results (collapsible, automatically truncated if too long), code blocks, images, timestamps, session titles, model info, and usage statistics.
Known Limitations¶
- Save Directory Restriction: “Save to Directory” only supports Markdown, HTML, and Plain Text. ZIP is not supported (because
ctx.fsdoes not support binary writing). - No Sub-session Export: Does not include subagent sub-session content.
- Plain Text Images: Images in plain text mode only display descriptions.
- PDF Generation: PDF is generated via browser printing, not by the plugin.
- Cost Information: Usage data comes from logs; cost information cannot be provided.
- Formatting Handling:
- Headings in the body Markdown will be demoted to levels 4-6 overall to maintain “Turns/Messages” as the document skeleton.
<details>in the body will be escaped as literals to prevent accidental collapsing of conversation content.
Summary¶
dsh-chat-export solves the problem of unreadable official raw logs. Through rendering tools and commands, it enables developers to quickly export readable transcripts for archiving or review.