插件目录 / Developer / dsh-conv-export
dsh-conv-export
已验证 · 实测可装 beijingwahw
功能简介
dsh-conv-export(对话导出):将当前DSH对话导出为Markdown、PDF或长PNG图片
可用 — 实测通过,早期项目
dsh-conv-export(对话导出):将当前DSH对话导出为Markdown、PDF或长PNG图片 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-conv-export(对话导出)
English | 中文
Export the current DeepSeek Harness conversation as Markdown, PDF (print dialog), or a long PNG image — one click in the session header, zero core changes.
Problems it solves
- Conversations evaporate: long sessions hold decisions, code, and error trails, but the harness has no built-in way to take them out. This plugin turns the rendered transcript into portable artifacts.
- One format never fits: sharing with a teammate wants Markdown; archiving for compliance wants PDF; pasting into chat wants an image. All three ship in one menu.
- Exports must match what you see: extraction runs at click time over the rendered DOM (including paged-in history), so the artifact is exactly the transcript on screen — code fences, tables, and emphasis preserved.
Features
- Header export button (download glyph) registered into the
conversation.session.header.actionsslot — additive, safely uninstalled, and mirrors its open state viaaria-pressed. - Dropdown menu with three sinks:
- Markdown (.md) — client-side download; assistant turns are serialized back from rendered HTML (headings, lists, fenced code with language, tables, blockquotes, links, inline emphasis).
- PDF (download) — the conversation is rasterized, sliced into A4-proportioned pages, and downloaded as a self-contained multi-page PDF. No print window, no dialog: the app tab never freezes.
- Long image (PNG) — offscreen render measured and rasterized through SVG
foreignObjectat 2x, images inlined as data URLs, downloaded as one tall PNG (height capped at 16000px).
- Sensible file names from the session title (sanitized, capped).
- Follows the harness
--dsw-alias-*design tokens; menu labels switch zh/en by document language. - Menu hygiene: Escape or outside-click closes; a toast reports long-image raster failures.
Install
Requires Node.js ≥ 22 and pnpm (npm install -g pnpm) — dsh plugin add installs the bundle into the profile with pnpm.
One-liner
dsh plugin add beijingwahw/dsh-conv-export --profile web
dsh web # restart the server to pick the plugin up
Common follow-ups: upgrade
dsh plugin upgrade dsh-conv-export --profile web; uninstalldsh plugin remove dsh-conv-export --profile web; local-path installdsh plugin add ./dsh-conv-export --profile web.
The package declares dsh.bundle.patch (mounts the host registration row) and dsh.client (serves the browser half at /plugins/<id>/client.js). lib/ is committed, so the GitHub tarball installs without a build step.
Usage
Open any conversation, click the download icon in the session header, pick a format. All three formats download directly — no dialogs, the app tab stays responsive.
How it works
- The host half is an empty cordis registration shell; all behavior lives in the browser bundle (
lib/client.js), mounted by the stock loader with zero core changes. - Extraction walks
[data-conversation-scroll]in document order, pairing user rows ([class*="_userRow"]bubbles) with assistant markdown containers ([class*="_markdown_"]) — the stock renderer's stable class contracts. - The long-image path serializes a clean clone (explicit XHTML namespace, no offscreen offsets) into an SVG
foreignObject, validates it withDOMParser, then rasterizes on a 2x canvas. External images are fetched and inlined first; unreachable ones are dropped rather than tainting the canvas.
Known limitations
- The long-image and PDF paths rasterize through SVG
foreignObject(all evergreen browsers paint it); exotic embedded content may flatten. - PDF pages are raster images (text is not selectable); for selectable text use the Markdown export.
- Export scope is the active conversation column only — sidebar titles and settings pages are out of scope.
Troubleshooting
'pnpm' is not recognizedduringdsh plugin add→ install pnpm first:npm install -g pnpm.ETIMEDOUTfetching the GitHub tarball → pnpm/Node ignores the Windows system proxy (browsers read it; terminals don't). Fix once, forever — persist your proxy into npm config (pnpm reads it too):$s = Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' if ($s.ProxyEnable -and $s.ProxyServer) { npm config set proxy "http://$($s.ProxyServer)" npm config set https-proxy "http://$($s.ProxyServer)" }Every later
dsh plugin add/pnpm/npmcall then goes through the proxy with no env vars. Undo withnpm config delete proxy; npm config delete https-proxywhen running without the proxy tool. Per-session alternative:$env:HTTPS_PROXY = "http://$($s.ProxyServer)". Or switch the proxy tool to TUN/global mode so all traffic is covered. Prefer a fixed port? Pick an obscure one such as 49151 — the last registered port before the dynamic range, so no common service, no ephemeral allocation, and no proxy tool default ever lands on it. Port-free fallback: download the tarball in your browser and install locally:dsh plugin --profile web add .\Downloads\main.tar.gz.EADDRINUSE ... :3080ondsh web→ a previousdsh webis still bound to the port. Stop it (Ctrl+C in its terminal; on Windows:Get-NetTCPConnection -LocalPort 3080 | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force }), or start on another port withdsh web --port 3081.
License
MIT
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-conv-export」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:beijingwahw/dsh-conv-export Headless(CLI)profile:
dsh plugin --profile headless add github:beijingwahw/dsh-conv-export 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。
使用场景
扩展 agent 的编码能力面——给它一个新工具、工作流或集成,让它接手以前做不了的开发任务。
适合谁
想让 dsh 在真实代码库上像队友一样干活的开发者——能改、能跑、能验证,而不只是回答问题。
二次开发建议
工具/命令面就是缝:暴露更多 SDK 能力、加更聪明的上下文接线,或收紧改代码与验证之间的循环。