DSH Plugins Marketplace

DSH Plugins

Plugins

/

Sessions & Messages

/

dsh-conversation-purge

d

dsh-conversation-purge

Manifest valid

Permanently delete one conversation (archived or not) from its sidebar row menu, including its log, projection cache, archive state, and reminders.

UI (client)hasBundlePatch

dsh-conversation-purge

Permanently delete one conversation at a time — archived or not — straight from its sidebar row menu in DeepSeek Harness.

DeepSeek Harness (DSH) can archive a session but never delete one: the JSONL backend keeps every log on disk forever. This plugin adds the missing operation to the row's ⋯ menu, behind a confirmation dialog that names the conversation, shows whether it is archived, its log size, and how many subagent sessions it spawned.

在 DSH 侧栏会话行的 ⋯ 菜单里增加「彻底删除对话」:带二次确认,删除该对话的会话日志、投影缓存、归档/置顶状态、所属工作区记录和绑定提醒;运行中的对话会被拒绝。

Install

DSH 0.2.1 or newer (verified on 0.2.1-rc.2), Node ^22.19.0 || >=24.

# npm
dsh plugin --profile <profile> add dsh-conversation-purge

# GitHub
dsh plugin --profile <profile> add github:Seastar101/dsh-conversation-purge

Or in the Web UI: Settings → Plugins → Install and enter the package name. Restart dsh web (or the desktop app), then reload the page. The Host half and the browser half activate together.

Use

  1. Hover a conversation row in the sidebar and open its ⋯ menu.
  2. Choose 彻底删除对话 / Delete permanently (last row, separated).
  3. In the dialog, review the target and tick I understand this cannot be undone.
  4. Press 彻底删除 / Delete permanently.

The row disappears immediately (the Host emits DSH's own api-session/removed notification); if the deleted conversation is the one open in the main panel, its composer becomes read-only.

What gets deleted

  • The append-only session log directory under the configured session root — every retained format generation and the write-lock file.
  • The persisted projection checkpoint (<storage-root>/session_projcache/sessions/<id>.json and its .bak.* files).
  • The session's archive entry, pin, and its membership/order slot in every Workspace.
  • Every reminder bound to it.
  • Every subagent session descended from it (origin: subagent lineage). A fork is an independent conversation and is deliberately kept.

What is deliberately left alone

  • Shared attachment bytes. Image/file attachments are content-addressed and deduplicated across conversations; deleting them could break another conversation.
  • Backups and telemetry outside $DSH_HOME.
  • A durable full-text search index. The shipped profile opens the SQLite session query store as :memory: / openAt: never, so there is nothing persistent to clean; if a profile enables durable content search, stale hits fail to resolve and are dropped on rebuild.

Behavior and limits

  • Running conversations are refused (error.running). Stop the turn first.
  • Idle but loaded conversations are safe. The JSONL backend keeps no open log descriptor between batches, so the directory removes normally; later appends fail with ENOENT instead of recreating a header-less log.
  • Filesystem fallback. If the directory cannot be removed, the log files are truncated to zero bytes and the directory is recorded in <session-root>/.session-purge-pending.json; the Host retries the removal once at the next start, before anything can resume the session.
  • User-only. Deletion is irreversible and authority-adjacent, so this package registers no agent tool. There is no bulk delete either: the operation always names one conversation.
  • Root discovery. The session and storage roots come from the mounted backend (sessionPersistence.root), then the profile's configEditor values, then $DSH_HOME (~/.dsh) defaults. No configuration is required.

Composability

Requires connection and sessionPersistence. Workspace accounting, reminders, the running-work check, and the projection cache degrade gracefully when their owning plugins are not composed.

The UI goes through two shipped slots — sidebar.workspaces.session.menu.item and shell.overlay — and uses only theme tokens, so it follows the host's light/dark themes and locale. Dictionaries ship for English and Simplified Chinese.

Development

npm test
  • index.js — plugin entry: the two authenticated exact-fetch routes (/api/session-purge/inspect, /api/session-purge/delete) on the connection.fetch channel.
  • lib/purge.js — root discovery, path encoding (~XXXX, mirroring the JSONL backend), lineage collection, workspace/reminder cleanup, directory removal with truncation fallback, pending queue.
  • client.js — the ⋯ menu row, the confirmation dialog, the stylesheet, and the locale dictionaries.

License

MIT.

Comments

Loading…

Similar plugins

dsh-conversation-cleaner

by xiaoy616

Clean up conversations from the DSH sidebar: per-conversation file count and total memory, open/reveal/delete generated files, open the conversation workspace folder, and permanently delete conversati

Manifest valid

★ 0

MIT

JavaScript

Oct 19, 2026

dsh plugin --profile web add dsh-conversation-cleaner

Manage archived conversations in the Settings UI: unarchive them back to the sidebar, or permanently delete them with confirmation.

Sessions & MessagesManifest valid

★ 0

↓ 285/wk

MIT

JavaScript

dsh plugin --profile web add dsh-plugin-archived-conversations

by Very12345

Delete a conversation straight from the DSH Web GUI sidebar row, including its DSH archive-gate entry. Standalone, DSH-version-agnostic DSH plugin.

Sessions & MessagesManifest valid

★ 0

MIT

JavaScript

Oct 2, 2026

dsh plugin --profile web add @very12345/dsh-archive-delete

Adds a permanent-delete row to the sidebar menu of archived sessions, removing the session log, its projection cache and its workspace registration.

Sessions & MessagesManifest valid

★ 0

dsh plugin --profile web add dsh-session-purge

by joyboy-yy

Keeps archived sessions out of the DSH conversation list and adds a panel to restore them or delete them permanently - session log, archive and pin records, and projection cache.

Sessions & MessagesManifest valid

★ 0

MIT

JavaScript

Oct 16, 2026

dsh plugin --profile web add dsh-archive-purge

by akira399

Permanently delete DSH sessions from the file system, right from the sidebar conversation menu (真正的物理删除,不是归档隐藏).

Development & InfrastructureTerminal & ClientsManifest valid

★ 3

↓ 281/wk

MIT

JavaScript

Aug 15, 2026

dsh plugin --profile web add dsh-session-delete