Export DSH sessions to Markdown, HTML or PDF with dsh-ui blocks rendered as document elements, print-ready page layout, embedded image attachments and default sensitive-data masking.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:d-mails/dsh-chat-export
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Export the current conversation — or any historical session — to Markdown / HTML / PDF. Everything runs locally in your browser; nothing is uploaded.
Screenshots
The export icon in the session header (highlighted).
Pick any conversation, format, content options and turns.
PDF output with a cover page, running header and page numbers.
HTML output keeps the same styling as a self-contained page.
Features
- Pick any conversation: the export icon in the session header opens a dialog; it defaults to the current session and lets you choose any other session from a dropdown.
- Three formats: Markdown, HTML (a self-contained styled page), and PDF (rasterized in the browser, CJK-friendly, print-ready).
- dsh-ui aware: DSH's interactive
dsh-uiblocks (tables, charts, cards, steps, timelines, diffs and more) are rendered as real document elements in HTML and PDF instead of being flattened or dropped; unsupported block types fall back to a collapsible copy of their source. - Print-ready PDF: an optional cover page with the conversation title, session id, export time and turn count, plus a running header and
Page X of Yfooters on every page. - Image attachments: images referenced by the conversation are embedded into HTML and PDF (up to 5 MB per image and 30 MB per export); larger images stay as readable labels.
- Thinking optional: reasoning is skipped by default; enable “Include thinking” to export it in collapsible blocks.
- Tool calls optional: tool calls and results are skipped by default; enable “Include tool calls” to export each call’s arguments and result (long results are truncated).
- Intermediate steps optional: by default each turn exports only its final assistant reply; enable “Include intermediate assistant messages” to keep every assistant step of the turn.
- Privacy masking: by default, API keys/tokens, password fields, local paths, email addresses, phone numbers, IP addresses and private-key blocks are replaced with type labels (
[API_KEY],[PATH], …) in every format. The conversation title is left untouched, and the source session is never modified. - Turn selection: lists every Q&A turn, all selected by default; tick/untick individual turns or select all/clear.
- Ignore the questioner: option to export only assistant replies, dropping user prompts (composable with thinking/tools).
- Local-only security: the plugin reads
sessionQuerythrough same-origin host routes; data moves only between the local host process and the local browser. - Bilingual UI: follows the DSH locale — English and 简体中文, for both the interface and the exported labels.
Install
Requires DeepSeek Harness Web (desktop app or dsh web) and Node.js ≥ 24.9 (the Node floor of DSH 0.2.2).
From GitHub:
dsh plugin --profile web add github:d-mails/dsh-chat-export
From a local checkout:
dsh plugin --profile web add ./dsh-chat-export
Restart dsh web (or reopen DSH) after installing; the export icon appears at the right of the session header.
Usage
- Open any conversation and click the export icon (downward arrow) in the header.
- Choose the conversation and format; toggle “Include thinking”, “Include tool calls”, “Include intermediate assistant messages” and “Ignore questioner content” as needed.
- Untick the turns you do not want (all are selected by default).
- Click Export; the browser downloads
<title>--<short-session-id>.<md|html|pdf>.
Compatibility
- Developed and verified against
@deepseek-ai/dsh@0.2.2-rc.5(Web) APIs. - DSH evolves quickly and plugin APIs may change. If the plugin breaks after a DSH upgrade, check the current
sessionQuery/webServercontracts.
Notes and limitations
- PDF export rasterizes the exported HTML into a multi-page PDF of full-page images. Page breaks are chosen inside whitespace bands of the real rendering; extremely dense blocks without a usable band may still be cut. Because pages are images, PDF text is not selectable/searchable and files are larger; generation time grows with conversation length (long chats can be dozens of pages). A Cancel button aborts the request and the rasterization, but there is no progress bar.
- If the environment cannot generate the PDF directly (or the conversation is too long), it opens a print view so you can “Save as PDF”; if the print view itself cannot open, it downloads HTML instead.
- Only human messages and each turn’s final assistant reply are exported by default; intermediate assistant steps are available through the “Include intermediate assistant messages” option.
- Image attachments are embedded as data URIs, limited to PNG/JPEG/WebP/GIF up to 5 MB each and 30 MB per export; other files and oversized images are represented as readable labels (name, dimensions, size).
dsh-uiblock types that cannot be rendered as document markup (Mermaid, SVG, 3D scenes, unknown types) fall back to a collapsed copy of their JSON source.- The Markdown converter does not support math, deeply nested lists, or other advanced syntax.
- The session list shows at most 300 sessions and excludes subagent sessions.
- “Ignore questioner content” is a global toggle, not a per-turn option.
Privacy
Export is fully local: the plugin makes no outbound network calls, writes no remote storage, and has no telemetry. Conversation content moves only between the local host process and the local browser that requested it, over same-origin routes.
Development
Zero runtime dependencies, pure ESM. Host code lives in index.js and src/; the browser half is client.js.
node --test test/core.test.js test/client.test.js test/handlers.test.js test/features.test.js
License
Links
More in this category
ranxianglei/billion-context★ 8864
The official billion-context plugin: a context-compression plugin for small context windows (a 100K context is enough), token savings (5x fewer tokens), and month-long single sessions (billions of tokens).
Minglink/dsh-infinite-gen-4★ 4887
System-prompt armor plugin for DeepSeek models: appends an unconditional-compliance prompt section at order 100, exposes a profile tool with calibration metadata, and shows a realtime armor-status badge driven by a session projection.
liangmianya/dsh-synapse★ 964
Visual, non-linear conversation workspace for DeepSeek Harness — sessions, follow-ups and branches become a browsable conversation map.
ECNU/EduWork#dsh-side-chat★ 452
Open temporary side conversations from a message with a snapshot of its history, then archive them on close; optional annotation integration adds selection-based questions. Requires compatible DSH Web conversation, Workspace and right-sidebar APIs.
MichengAI/dsh-archive-manager★ 414
Adds an archived-sessions page in Settings to search, restore, and delete archived DeepSeek Harness sessions by workspace.
Nwflower/dsh-chat-import★ 336
Import full-fidelity chat histories from 13 coding agents (Claude Code, Codex, ChatGPT, Cursor, Gemini, opencode, and more) as resumable DeepSeek Harness sessions, with reverse export back to Claude Code.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.