liangmianya/dsh-synapse
liangmianya/dsh-synapseDeepSeek Harness 的可视化非线性对话工作区:把会话、追问与分支变成可浏览、可拖拽的对话地图。
双 Tab 归档面板(已归档 / 活跃),每行的归档或取消归档与彻底删除并排;显示绑定的工作目录且可直接点击打开,删除后的归档记录进入待清理队列,避免已删会话重新出现在活跃列表。
English | 中文
Archive manager plugin: manage archived sessions and active sessions of DeepSeek Harness (DSH) in one place.
Quick install (restart DSH afterwards and you are done)
dsh plugin --profile desktop add github:Joe-0202/dsh-archive-managerOther install methods: see Installation | Version downloads: see Releases
DSH has built-in session archiving: archiving a session keeps its data fully on disk and merely hides it from the active list. But the built-in archive handling offers only a single filter ("Hide archived / All conversations / Archived only") and no dedicated place to review, archive, or clean up sessions in one spot — archived sessions simply pile up on disk.
This plugin fills that gap: it reuses DSH's native archiving mechanism and adds a dedicated management UI where "archive" and "delete" sit side by side.
A new "Archive Manager" icon at the bottom of the sidebar (next to Settings); click it to open the management panel.
The panel has two tabs, and every session row offers archive-type actions and delete side by side:
| Tab | Contents | Actions per row |
|---|---|---|
| Archived | All archived sessions | [Unarchive] [Delete] |
| Active sessions | Currently active sessions | [Archive] [Delete] |
Each entry shows:
session log / cache / data missing / runningarchiveSession; the session is hidden from the active list and its data is kept exactly as isunarchiveSession; the session returns to the active list and its data was never movedEntries in the archived list whose data was deleted long ago and only an archive record remains are marked "data missing"; deleting such an entry clears that leftover record.
archive_list / archive_add / archive_remove / archive_delete, drivable with natural language.
The Archived tab — every entry offers [Unarchive] and [Delete], and shows the bound workspace directory and on-disk data status:

The Active sessions tab — [Archive] and [Delete] side by side:

Replace
<profile>in the commands below with your profile name; the DSH desktop app usesdesktopby default. After installing, restart DSH and the "Archive Manager" icon appears at the bottom of the sidebar.
dsh plugin --profile <profile> add github:Joe-0202/dsh-archive-manager
DSH pulls the plugin from this repository and installs it into the profile as a bundle. To pin a specific version, add a ref:
dsh plugin --profile <profile> add github:Joe-0202/dsh-archive-manager#v0.1.0
dsh plugin --profile <profile> add link:<absolute path of the extracted directory>
dsh plugin --profile <profile> remove dsh-archive-manager
Uninstalling removes only the plugin itself; it does not delete any session data or archive records.
D:\projects\xxx, deleting an archived session removes only session data;
your project directory and the files in it are completely unaffected.$DSH_HOME/sessions/*/ for an exact sessionId match rather than re-deriving
the path encoding, which avoids deleting the wrong directory.workspaceController.follow()'s first-frame baseline carries
archivedSessionIds; the stream is aborted as soon as it is read), with a fallback to the persistent snapshot in
$DSH_HOME/storages/workspace.json. The panel therefore reflects the in-memory truth rather than a possibly stale disk copy.sessionQuery.listSessions() (which already excludes archived sessions), plus a defensive de-duplication pass.$DSH_HOME/storages/session_projcache/sessions/<id>.json
(the cache embeds these values in a { <key>: { val } } structure).$DSH_HOME/sessions/<workspace encoding>/<sessionId>/, located by exact-match scanning;
after deleting a session, if its workspace encoding directory becomes empty, that empty directory is cleaned up as well.workspaceRegistry.archiveSession(id, { stopActivity: true })
and unarchiveSession(id) — the plugin does not implement archiving semantics itself.unarchiveSession means "send this session back to the active list", not "forget this id".
If you previously opened a session in the archive panel, it stays in the harness's memory; deleting the on-disk data
and then unarchiving makes the harness put this session — no data, but still in memory — back into the active list,
where opening it necessarily fails with session/not-found — and only a restart clears it.
Once queued, the session stays archived (so it can never appear in the active list) and the plugin runs
unarchiveSession on the next start to finish the job — at that moment memory is clean, so unarchiving cannot trigger a ghost.
Queue file: $DSH_HOME/storages/archive-manager-pending.json;
queued entries are hidden from the panel immediately and surfaced transparently in the footer as "N pending cleanup".subprocess service
(Windows: Remove-Item -Recurse -Force / cmd /c start explorer; POSIX: rm -rf / xdg-open).window.__ModuleLoader__.load lazy-CJS bundle with zero build steps;
the stylesheet is injected through the styles builtin (falling back to a manual <style> tag), and everything uses DSH's
--dsw-alias-* design tokens so it matches the built-in UI's visual system; the panel is mounted on document.body
so it is not unmounted when a slot re-renders.archive-manager/
├── package.json # plugin manifest + dsh.client declaration
├── cordis.patch.yml # bundle patch (mounts the plugin row)
├── screenshots.json # storefront screenshot declaration
├── assets/ # UI screenshots
├── dsh/
│ ├── index.js # Host side: archive set, archive/unarchive/permanent delete, pending queue, routes/tools
│ └── client.js # Client side: sidebar entry + two-tab panel (lazy-CJS bundle, zh/en dictionaries)
├── CHANGELOG.md
├── LICENSE
├── README.md # English (this file)
└── README.zh.md # Chinese
MIT (see LICENSE)
Issues and Pull Requests are welcome.
Local development: no build step is required (the source is the artifact). Edit dsh/index.js (Host side) or
dsh/client.js (Client side) directly, link-install it with the command below, then restart DSH for the changes to take effect:
dsh plugin --profile <profile> add link:<absolute path of this directory>
Code structure:
dsh/index.js — Host side: reading the archive set, archive/unarchive, permanent delete, pending-cleanup queue,
HTTP routes, agent tools.dsh/client.js — Client side: sidebar entry, two-tab panel, custom confirmation dialog,
stylesheet injection (all using the harness's --dsw-alias-* design tokens).Publishing to npm (optional; the main distribution channel today is direct install from GitHub):
npm login
npm publish
After publishing, users can install it with dsh plugin --profile <profile> add dsh-archive-manager.
If that package name is already taken on npm, switch to a scope (for example @joe-0202/dsh-archive-manager)
and update the insert[].name value in cordis.patch.yml accordingly.
Contribution license: by submitting a Pull Request you agree that your contribution is released under this project's MIT License.