dsh-session-delete: DeepSeek Harness Session Management and Retry Plugin

Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture. In daily use, cleaning up invalid sessions or remediating incorrect AI responses are common requirements. The dsh-session-delete plugin extends the sidebar menu and message interactions, providing thorough session deletion (cleaning up logs, workspace ownership, host in-memory instances, and UI rows) and message retry functionality.

Core Features

The plugin provides the following main capabilities:

  1. Sidebar session deletion: Adds a “Delete this session” option to the “…” menu on sidebar session rows, supporting permanent removal of the session log directory, workspace ownership, host in-memory instance, and client list row.
  2. Message retry: Adds a “Retry” button to the right of the copy button on user messages and AI replies; clicking it resubmits the input to the model.
  3. Bulk cleanup: Supports bulk session deletion (up to 200 sessions per operation) and supports sweeping stale rows.
  4. Running-session protection: Applies dual rejection (server-side and client-side) to running sessions to prevent accidental deletion.
  5. Recycle bin configuration: Supports controlling the deletion mode via the trashMode configuration item, allowing either direct permanent deletion or moving to the recycle bin.

Installation and Enablement

This plugin requires DSH 0.2.x or later. Place the plugin directory into the workspace, then run the following command:

install_bundle target: <本目录绝对路径>

After execution, the plugin bundles itself into the current profile and loads automatically. If the plugin does not take effect automatically, restart DSH.

Usage

Delete a Session

Click “…” on a sidebar session row, select “Delete this session”, and confirm in the dialog. Running sessions cannot be deleted.

Bulk Delete

  1. Click “Bulk delete” to the right of the “Workspace” title in the sidebar to enter bulk mode.
  2. Select the session rows to delete (official search and group filtering are supported).
  3. Click “Confirm deletion” to perform permanent deletion.

Retry a Message

To the right of the copy button on a user message or AI reply, click the refresh icon to retry. This action resends only the text content, not attachments.

Configuration

The plugin supports the optional trashMode configuration item to control deletion behavior:

- insert:
    - id: session-delete
      name: dsh-session-delete
      config:
        trashMode: purge
  • purge (default): Directly and permanently deletes session artifacts; unrecoverable.
  • recycle: Prefers the system recycle bin; falls back to the plugin recycle area on failure.

Notes

  1. Unrecoverable: In the default purge mode, deletion is unrecoverable. If restoration is required, set trashMode: recycle and use tools such as @mzzsfy/dsh-session-manager to recover deleted items.
  2. Running-session protection: Running sessions cannot be deleted due to dual restrictions on both server and client.
  3. No peer dependencies: It does not declare any @deepseek-ai/dsh-* peerDependencies; compatibility detection relies only on the DSH version.
  4. Non-running sessions only: The sweep feature only cleans the list for sessions whose artifacts no longer exist.
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye