返回目录
Agent 与会话 插件

dsh-session-delete

mi-lu-uncle/dsh-session-delete

DSH plugin: permanent Delete-session action for the session menu (DSH only ships archive)

Stars
0
Forks
0
Issues
0
更新
24 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:mi-lu-uncle/dsh-session-delete

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

@mi-lu-uncle/dsh-session-delete

English | 简体中文 | 日本語

Adds a Delete session action to the session "…" menu of DeepSeek Harness (DSH).

DSH 0.2.0-rc.2 only ships archive (a soft delete: hidden, but all data is kept). This plugin fills the gap — one click permanently deletes a session together with its on-disk data.

Features

  • In the session row's "…" menu, right after the built-in Pin / Rename / Fork / Archive, a new Delete session entry appears.
  • Clicking it opens a confirmation dialog (showing the session title); confirming invokes the host-side delete.
  • Deleting cleans up three data locations:
    1. The session itself: ~/.dsh/sessions/<workspace>/<session-id>/
    2. The projection cache: ~/.dsh/storages/session_projcache/sessions/<session-id>.json
    3. The session's registration in the workspace index (sessionIds / archive / pin marks)
  • After a successful delete, the open UI needs no refresh — the row disappears via the api-session/removed event.
  • Rebuilds the default workspace registration: If the default workspace was deleted, the plugin recreates its registration using defaultWorkspaceId or the last remembered path and attempts to reattach its sessions. It leaves other deleted workspaces alone. DSH 0.2.1-rc.2 exposes no public API to reset a dangling defaultWorkspaceId, so this cannot guarantee full restoration of default-workspace behavior.

Safety

  • Running sessions refuse deletion: it uses the same workspace/session-activity detection as DSH's archive. Only genuinely running work (an in-flight conversation turn, background jobs, …) is blocked with "this session is running"; idle old sessions (even if still kept alive in DSH's memory) delete normally.
  • Deletion goes through DSH's own workspace-registry write paths (detachSession / unarchiveSession / unpinSession), so persisted state stays consistent.
  • Routes are same-origin fenced; only requests coming from the DSH UI itself are accepted.

Install

This plugin targets DSH 0.2.0-rc.2 and newer 0.2.x releases (currently verified on 0.2.1-rc.2), and is linked into the desktop profile as a local directory:

dsh plugin --profile desktop add "link:/absolute/path/dsh-session-delete"

Then restart DSH for it to take effect.

You can also edit ~/.dsh/profiles/desktop/package.json manually:

{
  "dependencies": {
    "@mi-lu-uncle/dsh-session-delete": "link:/absolute/path/dsh-session-delete"
  },
  "dsh": {
    "profile": {
      "bundles": [
        // ... existing ...
        "@mi-lu-uncle/dsh-session-delete"
      ]
    }
  }
}

Then run pnpm install in the profile directory and restart DSH.

Usage

  1. In the session list on the left, hover a session and click its "…".
  2. Choose Delete session.
  3. Click Delete in the confirmation dialog.

⚠️ Deletion is permanent and irreversible. Make sure the session really is no longer needed.

Limitations / notes

  • This is a community plugin built on DSH's public extension points (the session-menu slot sidebar.workspaces.session.menu.item plus host-side file/registry cleanup). If a future DSH release ships an official "delete session" API, prefer that.
  • Running sessions refuse deletion; if you really need one gone, stop it first (finish/archive its work) and then delete.
  • The full-text search index is a rebuildable read model of DSH's; right after a delete there may be briefly stale results until the next rebuild.

License

MIT

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类Agent 与会话
规则置信度低

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: session。