A Export MD button in the DSH Web session header that writes the current
conversation to a file chosen through the native save dialog, plus a CLI and an
HTTP route over the same renderer. A toast then names the file that was written, or
carries the reason if it failed.
It reads session logs directly from disk, multi-frame zstd included, and handles
v0, v3 and v4 — each verified against real logs.
Requires Node 22.15+. The
node:zlibzstd API does not exist in Node 20 or 21.
After installing or updating, restart DSH and hard-refresh the page
(⌘⇧R / Ctrl+Shift+R).
Install
Open Plugins in the DSH sidebar → Add plugin → paste
https://github.com/hoshF/dsh-md-export → restart DSH.
Fixed
- Reject corrupt or truncated zstd frames and trailing garbage instead of silently
skipping content; validate complete frame boundaries and the decoder's input
consumption. - Preserve consecutive blank lines in message code blocks and tool arguments/results.
- Keep Unicode surrogate pairs intact when truncating title-based filenames.
- Exclude sentence punctuation from bare references and number mixed bare/Markdown
links by their actual first appearance, retaining labelled duplicates. - Cancel stale saved-state timers and prevent overlapping exports or UI updates
after unmount; cancellation and failures allow retrying. - Reject missing CLI output paths before writing files, and list all sessions
instead of silently stopping at 40. - Remove misleading pre-v3 warnings from the CLI and manual smoke script. Earlier
changelog statements that these warnings never existed have been corrected.
Added
- Compression integrity, content-preservation, Unicode filename, reference,
client lifecycle and CLI regression tests; alltest/*.test.mjsfiles run in CI.
Documentation
- Synchronise both READMEs and the format contract with strict frame decoding,
filename refresh timing, whitespace preservation and CLI argument handling.