DeepSeek Harness Sidebar Conversation Deletion Plugin

Preface

The sidebar of DeepSeek Harness (DSH) is used to manage multiple sessions, but the native interface lacks a “Delete Session” capability. When cleaning up old sessions or resetting a workspace, the only option is to manually delete the corresponding JSONL directory through the file system—a high-cost operation that carries the risk of accidental deletion. This article introduces a plugin that fills this gap.

Plugin Overview

dsh-session-delete-lite is a minimal DSH client plugin maintained by GTilor. Its purpose is to add a “Delete session” action to the ⋯ menu of each session, allowing users to directly delete sessions from the sidebar.

Core Features

The plugin provides the following capabilities:

  1. Adds a “Delete session” action to the ⋯ menu of each session
  2. The corresponding row turns gray when a session is being deleted
  3. A confirmation dialog displays the session name to prevent accidental deletion
  4. On successful deletion, a green checkmark appears at the top; on failure, an amber notification is shown with the reason preserved
  5. Deletes the session’s JSONL directory, workspace-list entry, projection cache, and overflowed tool results
  6. Supports both default and custom directories
  7. Verifies that DSH confirmation records have been removed before deletion
  8. When using SQLite multi-session storage, the dialog explains the storage limitation and preserves history and sidebar entries
  9. Idle sessions can be deleted from the sidebar even if another session is currently open
  10. After deleting the current session, the view switches to a new session in the same workspace

Deletion is permanent and cannot be undone.

Installation and Enablement

Installation via npm is recommended. In DSH, open “Plugins → Add plugin” and paste the package name:

dsh-session-delete-lite

CLI installation command (you must first exit the desktop app; use dsh web for the Web profile):

dsh plugin --profile desktop add dsh-session-delete-lite

To pin a specific version:

dsh plugin --profile desktop add dsh-session-delete-lite@1.0.2

You can also install from GitHub:

github:GTilor/dsh-session-delete#v1.0.2

CLI:

dsh plugin --profile desktop add github:GTilor/dsh-session-delete#v1.0.2

Alternatively, download the package and specify the local path in “Add plugin”:

https://github.com/GTilor/dsh-session-delete/releases/download/v1.0.2/dsh-session-delete-lite-1.0.2.tgz

Removing the Plugin

dsh plugin --profile desktop remove dsh-session-delete-lite

How It Works

index.js handles POST /_dsh-session-delete/delete requests. client.js renders the menu item and confirmation dialog through DSH’s sidebar.workspaces.session.menu.item and shell.overlay slots.

When a session is opened in the Desktop or Web UI, web-agents.js retains the session close handle provided by DSH. After confirmation, the plugin checks for running tasks and queued user messages, closes the idle session, obtains exclusive write access to the history, moves the history out of DSH’s session scan scope, and then clears caches, workspace entries, and staged files. If cleanup is interrupted, the plugin restores state on the next DSH startup.

Requirements and Limitations

  • Supported DSH versions: 0.2.2-rc.5 and ^0.2.3-alpha.2
  • End-to-end tested in the Web UI of 0.2.2-rc.5 and 0.2.3-alpha.2
  • Desktop and dsh web share the same sidebar and session controller

Use Cases

  • Developers who need to periodically clean up historical sessions
  • Situations where too many workspace sessions clutter the sidebar
  • Scenarios requiring a quick reset of the current workspace

Notes

The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license before installation. Deletion is irreversible—use with caution.


This plugin has been included in the DSH Plugin ecosystem directory.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye