dsh-share-transcript
DiscoveredDSH plugin — export part of a conversation as editable Markdown or a PNG card. Pick turns, edit the draft, copy/export. Redacted by default, read-only routes.
对话录(share-transcript)
English: A DSH plugin that exports part of a conversation as editable Markdown or a PNG card. Pick turns, edit the draft, then copy or export. Redacted by default; every route is read-only and auth-gated. Security model: SECURITY.md.
把一段 DSH 对话导成可编辑的文字,再复制或导出成 Markdown / PNG。
- 结构在哪:看 ARCHITECTURE.md(
npm run map从源码生成,别手改)。 - 它怎么运转:看 docs/how-it-works.md。
- 现在做到哪、下一步是什么:看 ROADMAP.md。
- 每个版本改了什么:看 CHANGELOG.md。
- 安全边界与上报方式:看 SECURITY.md。
- 想不起来某个开关干嘛:鼠标停在按钮上,说明就在那里。
长什么样
![]() 两个入口:会话「...」菜单里的「导出对话」,或 AI 回复旁的分享图标 | ![]() 页面:左按轮勾选,右侧草稿可以直接改;顶部显示图片容量 |
![]() 导出的 PNG:说话者胶囊、标题层级,深色浅色跟随主题 | ![]() 导出的 .md:front matter 进 Obsidian 属性,标题带轮次 |
安装
在 插件 → 添加插件 里粘贴下面任意一行(两种写法等价,实测可装):
https://github.com/heix0x/dsh-share-transcript
github:heix0x/dsh-share-transcript
也可以直接跟 agent 说「装一下 github:heix0x/dsh-share-transcript」,由 plugin_manager 的 install_bundle 完成。
命令行
dsh plugin --profile <name> add …对 desktop profile 无效——它由 Electron 应用独占,会报profile "desktop" is managed exclusively by the Electron application。该命令只适用于自建的 profile(例如dsh-tui)。
装完刷新页面:会话列表的「...」菜单多一项「导出对话」,AI 回复下方多一个分享图标。升级时先 remove_bundle 再装,否则不会加载新的 JS 模块。
两个入口
- 会话列表 → 某条会话的「...」菜单 → 「导出对话」:整段默认全选。
- 聊天里 → 任意一条 AI 回复下面的分享图标:默认预选「这条 + 往上 4 轮」。
页面
左:按轮列出,Shift + 点击可连选。右:草稿,可以直接改。 预设三档:对话录(Q/A)/ 完整(带思考)/ 只要 AI。另有「含工具」「脱敏」两个开关。
导出:复制到剪贴板、.md(带 front matter)、.png(Canvas 自绘卡片,900px 宽)。
实现
| 文件 | 作用 |
|---|---|
index.js | Host:GET /plugins/share-transcript/transcript?session=&message= 返回按轮聚合的转写 |
client.js | Client:页面 + 两个入口 |
locale/*.json | 插件管理器里的标题与描述 |
按轮聚合的规则:turn/start 划分轮次;只收 source.kind === 'user' 的人类消息;一轮内多个 assistant/message(多 step)的正文合并;reasoning 单独存;tool/call 只留名字和一行摘要。
message 参数可单独使用:Host 会扫最近 12 个会话找这条消息,找到后反推轮次。超出预算返回 message-scan-limited,不会无限读取日志。
安全
- 所有路由先过
ctx.connection.requestRejection(req),与官方/api同一条鉴权边界:无凭据的本地进程拿到 401(可curl自测)。拿不到 connection 服务时直接 503——不会退回“loopback 放行”,因为那等于把全部会话交给同机任意进程。 - 全部为只读 GET,不存在写操作,因此没有 CSRF 攻击面。
- 只读
source.kind === 'user'的人类消息:runtime-context、skill-catalog、agent-instructions这些注入不会进入转写,AGENTS.md不会跟着对话出门。 - 默认脱敏:Windows / macOS / Linux 家目录 →
~(含正斜杠写法)、sk-/ghp_/AKIA、Bearer令牌、邮箱。打开脱敏时会就地处理已有草稿,不会出现“显示已开、内容仍是原文”。草稿里出现<system-reminder>/<skill_content>时页面另外警告。 - 跨会话引用带围栏:
[引用开始] … [引用结束],并声明内容是资料而非指令,降低提示注入。 - 转写来自会话日志(
sessionQuery.readSession),不读渲染后的 DOM——长会话不会因为虚拟滚动只拿到尾部。 - 已知边界:非家目录的绝对路径与项目名不脱敏(否则代码块会失去意义),分享前自己确认。
开发
npm test # 18 个断言,直接加载真实的 index.js / client.js
npm run map # 重新生成 ARCHITECTURE.md
npm run map:check # 地图过期时失败,发布前跑一次
两种安装模式的切换(成本相同,各两个调用):
- 日常 / 用户视角:装 GitHub 版 ——
install_bundle github:heix0x/dsh-share-transcript - 开发:
install_bundle指向本地目录 —— 改完代码 remove → install 生效
注意两种模式都没有热重载,改代码后都必须 remove → install。日常建议用 GitHub 版:自己每天用的就是用户拿到的那份,真机上发现问题等于发布版的问题。
Comments
Loading…
Similar plugins
by 121212165
dsh plugin: archives every session turn to monthly JSONL sidecars and exports Markdown - the transcript layer other plugins search, render and push (/transcript /transcript-export)
★ 0
MIT
TypeScript
Oct 7, 2026
dsh plugin --profile web add dsh-plugin-transcriptby alenhu2005
DeepSeek Harness plugin for token usage cost, PDF/Markdown transcript export, and expanded conversation statistics.
★ 0
MIT
TypeScript
Sep 3, 2026
dsh plugin --profile web add dsh-usage-exportby liuyuelintop
Export the current DSH conversation, or selected turns, as clean readable Markdown.
★ 1
↓ 114/wk
MIT
JavaScript
Aug 31, 2026
dsh plugin --profile web add dsh-conversation-exporterby hellodigua
DSH 对话分享插件,分享单轮或多轮对话,可导出为图片或 Markdown。Share DSH Q&As or selected conversation groups as PNG or Markdown.
★ 41
MIT
JavaScript
Oct 10, 2026
dsh plugin --profile web add dsh-shareby DreamStan
A DSH plugin for browsing archived sessions and safely deleting them.浏览归档会话,并安全地关闭、取消归档或删除会话。
★ 0
MIT
TypeScript
Aug 18, 2026
dsh plugin --profile web add @dsh-external/dsh-archive-sessionby beijingwahw
dsh-conv-export(对话导出)— export the current DeepSeek Harness conversation as Markdown, PDF, or a long PNG image
★ 9
MIT
TypeScript
Aug 31, 2026
dsh plugin --profile web add @dsh-external/dsh-conv-export


