Introduction¶
DeepSeek Harness (DSH) uses a plugin-based architecture. Session lifecycle management (archiving and deletion) usually requires manual operations or relies on UI interaction. The dsh-session-delete plugin standardizes management workflows for the archive area and trash bin via a command-line interface, and provides stable list numbering and keyword filtering to simplify batch operations.
Plugin Overview¶
Name: tangbingbinging/dsh-session-delete
Maintainer: TANGBINGBINGING
Category: Memory
Positioning: A DeepSeek Harness (DSH) session lifecycle management plugin that provides command-line management capabilities for the archive area and trash bin.
Key Features¶
-
Archive area management (
/t-archive)- View the archive list (grouped by workspace).
- Restore sessions.
- Delete sessions to the trash bin.
- Purge permanently.
-
Trash bin management (
/t-restore)- View the trash bin list.
- Restore sessions to their original workspace.
- Delete sessions from the trash bin.
- Empty the trash bin.
-
List numbering and filtering
- Stable numbering: List numbers remain stable after refreshing. Operated items leave an empty slot (
————) for easier identification. - Keyword priority: When entering a keyword, if there is a unique match, the operation is performed directly; if multiple items match, a temporary list is generated and must be operated via
--kw.
- Stable numbering: List numbers remain stable after refreshing. Operated items leave an empty slot (
-
Multi-workspace support
- The archive list covers all workspaces.
- The trash bin is global.
- Restore operations automatically place sessions back into their original workspace.
-
Safety mechanisms
- Rejects deletion of in-progress sessions (marked as
[运行中]).
- Rejects deletion of in-progress sessions (marked as
Installation and Activation¶
Install it with the official command:
dsh plugin --profile web add github:TANGBINGBINGING/dsh-session-delete
After installation, restart DSH (npx @deepseek-ai/dsh web), and you can use the relevant commands in the input box.
Typical Usage¶
List archives:
/t-archive
Restore archived sessions:
/t-archive 1 3
Delete archived sessions to the trash bin:
/t-archive --delete 1 3
Permanently delete archived sessions:
/t-archive --delete --purge 1 3
Keyword restore (unique match):
/t-archive "特定主题"
Operate on the temporary keyword list:
/t-archive "关键词" # 生成临时列表
/t-archive --kw 1 # 在临时列表中操作第 1 项
Trash bin operations:
/t-restore # 列出回收站
/t-restore 1 # 恢复回收站第 1 项
/t-restore --delete 1 # 彻底删除回收站第 1 项
/t-restore --clear # 清空回收站
Notes¶
- Bundle architecture: This plugin is of type
dsh.bundle.patchand is automatically registered after installation. No manual addition of aninsertentry incordis.patch.ymlis required. - Language environment: The default output is Chinese. To use English output, set the environment variable
DSH_LANG=en. - Dependency requirements: The runtime environment requires Node.js >= 20.
- Input parsing: Supports numbers (list items), IDs in
session-xxxformat, and arbitrary text (keywords). Parsing is language-independent. - Security restrictions: Sessions marked with
[运行中]cannot be deleted.
Conclusion¶
This plugin provides DSH users with a standardized session cleanup workflow. Combined with stable list numbering and keyword filtering, it can effectively improve session management efficiency. For more details and source code, see the GitHub repository.