chat-message-export
English | 中文
A DeepSeek Harness plugin that exports chat content as Markdown files.
| Where | Action | Output |
|---|---|---|
| Each finalized assistant reply's action strip | Download this reply | deepseek-reply-<timestamp>.md |
| Session header | Download the whole visible conversation | deepseek-conversation-<timestamp>.md |
The conversation export reads the Chat store's visible node order: user and
steering messages become ## User sections, and each Turn contributes only its
final reply — tool calls and reasoning are skipped, so the file reads as a
transcript rather than a log.
Why user bubbles have no button of their own
The Harness exposes per-message actions only through
conversation.chat.assistant-actions, which fires for finalized assistant
messages. User-row controls (copy, timestamp) are built into the host component
with no extension slot, so adding one there would mean re-implementing the whole
user row — attachments, images, references, pending and echo states — and
tracking upstream markup. The session-header export covers the user side instead.
Install
From a DeepSeek Harness session, point plugin_manager at this directory:
plugin_manager { action: "install_bundle", target: "<abs path>/chat-message-export" }
The package is linked into the active profile, so it applies to every session in that profile and survives restart. Refresh the Web page afterwards; the browser assembles client modules at page load.
For a local development loop, the Web client watches its own plugin bundles — a
rebuilt client.js can reload without a page refresh.
Layout
client.js browser half: slot entries, Markdown rendering, downloads
index.js host half (empty; everything renders in the browser)
cordis.patch.yml Loader row that inserts the package
package.json dsh.bundle.patch + dsh.client metadata
locale/en.json display metadata and copy (English)
locale/zh.json display metadata and copy (Chinese)
icon.svg plugin icon
Plain JavaScript — no build step, no dependencies. The browser half registers
through window.__ModuleLoader__.load and contributes two slot entries:
conversation.chat.assistant-actions, idexport, order20conversation.session.header.actions, idexport-conversation, order30
UI text goes through the Client locale service (ctx.locale.register); styles
use only --dsw-alias-* theme tokens, so the buttons follow light and dark
themes. Downloads use a transient <a download> with an object URL, so no Host
route or file write is involved, and the styles tag is removed when the plugin
unloads.
Package name
@local/chat-message-export is a private, unpublished scope. Keep the name in
package.json, client.js, cordis.patch.yml, and the locale meta in sync if
you rename it.
No comments yet. Be the first to write one.