Manage archived conversations in the Settings UI: unarchive them back to the sidebar, or permanently delete them with confirmation.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-plugin-archived-conversations
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:leogottadothebest/dsh-plugin-archived-conversations
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
This plugin publishes its README in Chinese only.
English: A DeepSeek Harness plugin for managing archived conversations in the Settings UI — unarchive them back to the sidebar, or permanently delete them (with confirmation). Ships a full
archivedSessionsremote API and batch unarchive. Bilingual (zh/en), light/dark theme aware.
DeepSeek Harness 插件:在设置界面管理已归档对话。
- 取消归档 —— 对话恢复到侧边栏原位置(工作区记账保持不变);
- 删除 —— 永久删除对话(内存会话、磁盘日志
session.jsonl.zstd、 工作区记账与归档记录一并清理),带二次确认; - 附带完整归档 API(
archive,与核心归档路径一致),并支持「全部取消 归档」批量操作。
对话被归档后不再出现在侧边栏;本插件是找回并清理它们的唯一入口。
功能
- 设置 →「已归档对话」页面,按归档顺序倒序列出全部已归档对话:标题、 工作区路径、最近活动时间;
- 空会话与筛选:创建后从未发送过消息的「空会话」(新对话占位被归档后 的残留)单独标注为「空会话」,并默认被「只看真实对话」筛选隐藏;关掉 筛选即可查看/删除它们。批量操作的确认框会如实写明其中包含多少个空会话;
- 行操作:取消归档、删除(
RiskConfirmation确认,需勾选 「我明白此操作不可恢复」); - 实时双向同步:在侧边栏归档的对话立即出现在本页;在本页取消归档的 对话立即回到侧边栏;
- 读取失败的坏行仍可删除(自愈);
- 中英双语,跟随浅色/深色主题。
安装
DSH 插件需要两步:作为依赖安装 + 挂载为 bundle 层(本包自带
dsh.bundle.patch,即 cordis.patch.yml 中的插入条目)。
# 桌面端(以默认 profile 为例):从 npm registry 安装
cd ~/.dsh/profiles/desktop
pnpm add dsh-plugin-archived-conversations
# 本地开发时也可从源码路径安装(替换为你的克隆路径)
# pnpm add /path/to/dsh-plugin-archived-conversations
# 把插件追加到 bundle 层:编辑 package.json,在 dsh.profile.bundles 中
# 加入 "dsh-plugin-archived-conversations"(dshmarket / 插件市场安装
# 插件时执行的正是这两步)。
然后重启 DeepSeek Harness,打开 设置 → 已归档对话 即可使用。也可在 插件市场(dsh-community-market)中安装本包(需发布到 npm registry)。
远程 API(宿主)
命名空间 archivedSessions(Typert 协议,严格 zod wire codec):
| 方法 | 参数 | 返回 |
|---|---|---|
list(signal) |
— | { items: ArchivedSessionItem[], archivedSessionIds: string[] } |
archive(request, signal) |
{ sessionId } |
{ sessionId, archivedSessionIds } |
unarchive(request, signal) |
{ sessionId } |
{ sessionId, archivedSessionIds } |
deleteSession(request, signal) |
{ sessionId } |
{ sessionId, deleted: true } |
ArchivedSessionItem:
interface ArchivedSessionItem {
sessionId: string
title: string | null // 投影缓存中的标题
blank: boolean // 创建后从未发送消息的空会话(无标题、无活动)
cwd: string | null // 工作区路径
createdAt: number | null // epoch ms
updatedAt: number | null // 最近活动(lastPromptAt ?? createdAt)
running: boolean // 会话当前是否仍在内存中
readError: string | null // 行读取失败原因(仍可删除)
}
业务错误({ok:false, error:{code, message, details}}):
not-archived、live-detach-unsupported、unsupported-backend。
兼容性
| DSH core | 状态 |
|---|---|
0.2.2-rc.1(当前 Desktop) |
✅ 已验证(原生 settings.section.icon 槽位 + 导航图标对齐) |
0.2.0-rc.2 |
✅ 兼容(peer 范围放行;宿主/客户端契约逐项核对无变化) |
0.1.7-rc.2 |
✅ 兼容(清单 create() 工厂 + 头部绑定的投影缓存 + 笔画名图标) |
0.1.5-rc.2(Desktop 2.0.10) |
✅ 兼容(schema codec + 带 cut 的投影缓存 + 尺寸名图标) |
0.1.2-rc.1 及更早 |
兼容(同上,旧线) |
同一份产物在两条线上都能渲染与调用:wire codec 同时携带两个时代的字段,
投影缓存按声明元数判别签名,图标按 ?? 在两代命名间解析;导航图标在
≥ 0.2.2-rc.1 上走外壳的原生槽位,旧线自动回退到不改变行几何的 DOM 交换。
peer 范围即开关。 DSH core ≥ 0.2.0-rc.2 的 profile loader (
dsh-app-boot的evaluatePluginCompatibility)会用semver.satisfies(runtime, range, { includePrerelease: true })校验插件的peerDependencies,任何一个@deepseek-ai/dsh*peer 不匹配就静默跳过 整个 bundle:插件完全不挂载,没有报错、没有弹窗,只有一条skippedBundles记录。0.x的 caret 不含下一个次版本行 (^0.1.7-rc.2=>=0.1.7-rc.2 <0.2.0-0),includePrerelease也不会 放宽上界——所以 0.1.6 在 0.2.0-rc.2 上「什么都没坏、却整个消失」。 支持矩阵与 peer 范围现在由scripts/check-peers.mjs在pnpm run check里强制对齐,两者不可能再各自漂移。
开发
宿主半程是纯 ESM(lib/index.js,lib/typert.js 经
dsh-typert-loader 自动注册,无需构建)。客户端半程必须构建:DSH
浏览器运行时把每个插件的 ./client 导出当作经典脚本加载,要求它通过
window.__ModuleLoader__.load({ id, factory }) 注册 CJS 工厂——裸 ESM
会导致页面启动失败。源码在 client/src/,发布产物是
client/client.js(zod 内联打包;react / jsx-runtime / primitives 走
平台种子模块外部化)。
pnpm run build:client # 生成 client/client.js(含冒烟测试)
pnpm run check # 构建 + 宿主守卫 + peer 支持矩阵守卫(CI 跑的就是它)
构建脚本自带三段式冒烟测试,任何一段失败都会让构建(以及 CI、prepack)
失败:
- 物化:产物必须注册
window.__ModuleLoader__.load({id, factory})工厂并导出apply/inject; - 激活:在 mock 的客户端 Context 上真正跑一遍
apply——校验settings.section与settings.section.icon两个注册(且两者 id 必须 相等,外壳只渲染 id 匹配的图标)、每个远程 codec 都带create()工厂、 样式表标签满足data-plugin/data-plugin-css契约; - 渲染:对 4 个页面状态 × 4 代 primitives 种子(尺寸名 / 笔画名
0.1.7-rc.2 / 笔画名 0.2.0-rc.2 / 笔画名 0.2.2-rc.1)各渲染一遍并遍历
结果树,任何元素类型为
undefined立即失败——这正是 primitives 导出 改名在浏览器里的症状(整页空白);导航图标也会单独特意渲染一次,并断言 它带着data-dshacv-icon-slot标记(旧线回退靠它判断外壳是否已经接管 图标)。种子导出表还会与已安装的@deepseek-ai/dsh-client-ui-primitives真实导出表交叉比对。
改完客户端源码后需重新构建并重装(file: 安装时 pnpm 会重新复制包)。
客户端组合所需的官方包在 package.json 的 dsh.client.inject 中声明。
架构与设计决策
见 DESIGN.md:核心归档机制的现状分析、删除顺序 (flush → detach → 删文件 → registry 清理)、实时同步链路、风险与取舍。
社区与发布
- 问题与功能建议:在 Issues 提交(Bug 模板 / 功能模板)。
- 参与开发:CONTRIBUTING.md;行为准则: CODE_OF_CONDUCT.md;安全漏洞请走 SECURITY.md 的私有报告渠道。
- 发布 npm:
pnpm publish。prepack钩子会自动重新构建客户端产物并做 宿主语法检查,保证发布的 tarball 永远包含最新client/client.js。 CI 同时校验产物与源码一致。 - 上架插件市场:向
awesome-dsh-plugin
提 PR 添加一条条目(dshmarket 等市场自动收录)。目录会校验 npm 包的
repository字段与条目仓库一致(防冒名)。
License
MIT
Links
More in this category
ranxianglei/billion-context★ 8957
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★ 4868
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★ 1012
Visual, non-linear conversation workspace for DeepSeek Harness — sessions, follow-ups and branches become a browsable conversation map.
ECNU/EduWork#dsh-side-chat★ 461
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★ 418
Adds an archived-sessions page in Settings to search, restore, and delete archived DeepSeek Harness sessions by workspace.
Nwflower/dsh-chat-import★ 339
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.