Introduction¶
The DeepSeek Harness (DSH) sidebar session menu currently only offers three actions: Renomear / Derivar / Arquivar. Arquivar merely hides a session without deleting any data; to truly clean up sessions, you have to navigate into deeply nested archive management pages and operate layer by layer, which is inefficient.
This plugin puts the “Delete” action back where you naturally expect it: it adds an Excluir sessão option directly in the session row’s ... menu.
Plugin Overview¶
The plugin is named dsh-excluir-sessao, published by maintainer wgrbiss-spec, and categorized under admin-security. It is a Brazilian Portuguese localization branch of dsh-delete-session, retaining the original’s support for Chinese, English, and Russian, while adding a browser-side pt-BR interface.
The plugin registers through DSH’s sidebar.workspaces.session.menu.item slot, placing “Excluir” below “Arquivar sessão”. The delete action defaults to sending items to the system trash, with an option to configure permanent deletion. For sub-sessions (subsessões), batch processing options are provided.
Core Features¶
-
Direct deletion from the menu
Adds an “Excluir sessão” option to the...menu on each sidebar session row. The option is registered on the official slotsidebar.workspaces.session.menu.item; the session ID is injected by the host, ensuring the action always targets the clicked row and never switches the current session. -
System trash by default
Deletion defaults to the system trash (Lixeira on Windows / macOS,gio trashon Linux), so accidental deletions can be recovered. Disabling “Excluir para a lixeira” in the plugin settings causes deletion to act directly on disk, with no way to undo. -
Confirmation dialog and risk warnings
A dialog appears before deletion, displaying the session ID in the title. The dialog content syncs with the configuration: when “Send to trash” is enabled, it shows “enviar para a lixeira do sistema”; when disabled, it shows “excluir permanentemente… não pode ser desfeito”. Whether the confirmation dialog appears is entirely controlled by the settings page; the Shift key forces it to display temporarily. -
Sub-session batch processing
Sub-sessions are sessions with their own independent directories and logs. Enabling “Excluir também as subsessões” automatically deletes sub-sessions when the main session is deleted. Disabling this option causes the dialog to list sub-sessions for individual selection. -
Batch deletion
Select “Selecionar várias” from the session menu to enter multi-select mode. An action bar appears at the bottom of the sidebar showing “N selecionadas / Cancelar / Excluir”. Deletion runs in batches, issuing up to 6 concurrent requests, with real-time progress display. Failed rows are re-marked for retry. Esc or Cancel exits multi-select mode. -
File handling
Files inside Git repositories are ignored by default to prevent accidental loss of project code when deleting a session. An optional “archive conversation-produced files” feature moves files generated during conversations to a specified directory (default:$DSH_HOME), configurable as “new files only” or “new and modified”, and either “archive directly” or “list for selection”. -
Security and permissions
The plugin’s host route accepts only local connections (loopback socket + loopback Host header + same-origin check) to prevent remote access. Sessions currently being written to return a 409 error to avoid conflicts. -
Multi-language support
Menus, dialogs, and the settings page follow DSH’s language setting (zh / en). In a browser environment, the pt-BR interface is used automatically; in environments where DSH does not support the selected language, Russian is used as fallback. -
Zero dependencies
No DSH SDK dependencies. All services are obtained on demand through the cordis context.
Installation and Activation¶
Install via npm:
dsh plugin --profile web add dsh-excluir-sessao
Or install from GitHub:
dsh plugin --profile web add github:wgrbiss-spec/dsh-excluir-sessao
After installation, restart dsh web for the changes to take effect.
In the DSH Desktop application, go to Configurações → Plugins to install. CLI installations under profiles/web will not sync to the desktop app.
Typical Usage¶
- In the sidebar session list, hover over the target session row and click the
...menu on the right. - Select Excluir sessão.
- A confirmation dialog appears on first use; to permanently disable the dialog, turn off Perguntar antes de excluir in the plugin settings page.
- If you delete by mistake, open the system trash and recover
session-<id>andsession-<id>.json. - In multi-select mode: menu → Selecionar várias → check multiple rows → the bottom action bar shows the selection count → click Excluir; press Esc or Cancel to exit multi-select mode.
Use Cases and Considerations¶
Suitable for developers who frequently need to clean up sessions, especially those managing large numbers of sub-sessions, conversation files, and Git repositories.
The plugin runs with the current DSH process permissions. It is recommended to review the source code and license (MIT) before installing. Configuration items involve file operations and system trash behavior, so adjust them carefully based on your actual needs.
Summary¶
This plugin moves the high-frequency “delete session” action from deeply nested configuration pages to the sidebar menu, providing default trash protection, batch processing, sub-session management, and file archiving capabilities—helping agent developers maintain their session environment more efficiently.
Plugin directory: https://www.skillhub.cn/plugins/wgrbiss-spec/dsh-excluir-sessao
GitHub: https://github.com/wgrbiss-spec/dsh-excluir-sessao