dsh-session-delete: One-click Sidebar Session Deletion — Archive First, Then Permanent Disk Log Cleanup

Introduction

In DeepSeek Harness, the official “Archive” operation for sidebar session management is typically just a logical cleanup, leaving disk logs intact. If you want to completely free up space or purge sensitive data, manual deletion can be cumbersome. The dsh-session-delete plugin solves this issue by providing a one-click session deletion entry in the sidebar. It prioritizes the official archiving workflow before deletion to ensure thorough cleanup of disk logs.

Plugin Overview

dsh-session-delete is a DeepSeek Harness client plugin developed by longhao666666. It is a zero-dependency, standard Cordis plugin consisting of pure JavaScript source code loaded directly. It requires no compilation, no Token/API Key, and no additional services. It is open-sourced under the MIT License.

Core Features

  1. Two Entry Points: Supports a trash can button when hovering over a session row, and a red “Delete Session…” item in the session row menu (positioned after “Archive”).
  2. Confirmation Dialog: The dialog explicitly warns that “The complete conversation history of ‘xxx’ (including disk logs) will be permanently deleted. This operation is irreversible,” preventing accidental touches.
  3. Safety Guardrails: Executes the official archiving workflow first; rejects deletion of running (live) sessions; validates the directory structure (<root>/<project>/<session-id> two-level path) before deletion to ensure only the target session’s own directory is removed.
  4. Precise Locate: Uses the locate() position provided by the persistence layer; never manually concatenates paths.
  5. Instant Feedback: Displays a toast notification “Session ‘xxx’ deleted” upon successful deletion, and the session list refreshes immediately.

Installation and Activation

Clone the repository locally and run the installation script:

git clone https://github.com/longhao666666/dsh-session-delete.git
cd dsh-session-delete
powershell -ExecutionPolicy Bypass -File .\install.ps1

After installation, you must restart DeepSeek Harness and confirm that @local/dsh-session-delete is enabled in the “Plugin Management” page.

Usage Instructions

  1. After restarting DSH, hover your mouse over any session row in the sidebar and click the trash can icon; or open the session row menu and select “Delete Session…”.
  2. Click “Delete” in the confirmation dialog.
  3. Once you see the “Session ‘xxx’ deleted” toast, the process is complete, and the corresponding log directory on the disk has been cleaned up.

Notes

  • Zero Dependencies: A standard Cordis plugin with pure JS source loaded directly—no compilation, no Token/API Key, and no additional services required.
  • Irreversible Deletion: This deletes the session’s complete record (including disk logs) and is unrecoverable. If you do not wish to delete so thoroughly, please continue to use the official “Archive” feature.
  • Uninstall Command: powershell -ExecutionPolicy Bypass -File .\install.ps1 -Uninstall.
羽毛球分组比赛记分
小程序二维码

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

Xiaoye