DeepSeek Harness 插件

dsh-session-delete

dsh plugin: t-archive / t-restore - archive-area and trash management for conversations (list, filter, restore, delete, purge)(英文原文)

跳到安装方式

来源信息

GitHub 仓库
TANGBINGBINGING/dsh-session-delete
最近更新
2026年8月15日
分类
记忆
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/TANGBINGBINGING/dsh-session-delete
插件名:dsh-session-delete
作者:TANGBINGBINGING

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器4 个文件
README.md来源说明 · 只读预览
README 语言

dsh-session-delete

A DeepSeek Harness (dsh) plugin for conversation lifecycle management: archive area and trash commands with stable list numbering, keyword filtering and temporary keyword scopes.

中文说明见 README.zh.md

> Vibe coding notice — this plugin was developed end-to-end through vibe > coding: built iteratively via interaction between the author and > deepseek-v4-flash running on DeepSeek Harness, and published by > deepseek-v4-flash + Harness on behalf of the author.

Features

  • /t-archive — manage the archive area (conversations hidden by the sidebar's archive action)

- list (grouped by workspace folder), restore, delete into trash, or purge permanently - includes an "ungrouped (stray)" section for orphaned fork/subagent sessions whose parent was deleted

  • /t-restore — manage the trash (files moved out by deletions)

- list, restore to the original workspace, delete one, or clear all

  • Stable list numbering — between two list refreshes, one number always maps to one conversation; operated slots show a gap (———— restored (slot empty)) instead of renumbering
  • Keyword-first interaction — a keyword that matches exactly one conversation operates on it directly; multiple matches create a temporary keyword list, then /t-archive --kw <number|keyword> operates within it (a non-distinctive keyword is rejected, no nested lists)
  • Batch numbers (--delete 1 3 5), full session-… ids, --purge/--clear
  • Multi-workspace aware: archive listing covers all workspaces; trash is global; restore returns to each conversation's original workspace
  • Safety: refuses to delete sessions with active tasks (agent.status === 'running'); all file paths come from official APIs

Install

From GitHub (requires the repo to be published first):

dsh plugin --profile web add github:TANGBINGBINGING/dsh-session-delete

From a local checkout:

dsh plugin --profile web add file:C:/path/to/dsh-session-delete

Restart dsh (npx @deepseek-ai/dsh web), then type /t-archive or /t-restore in the input box.

> The plugin is a bundle (its package.json declares dsh.bundle.patch), so it registers itself — do not add a manual insert entry in the profile's cordis.patch.yml (duplicate loader entry ids crash dsh on startup).

Usage

/t-archive                        list archive area (grouped by workspace, refresh)
/t-archive <number...>            restore (back to conversations)
/t-archive --delete <number...>   delete into trash
/t-archive --delete --purge <number...>   purge permanently
/t-archive <keyword>              unique match → restore directly; multiple → temporary keyword list
/t-archive --delete <keyword>     unique match → delete directly
/t-archive --kw <number|keyword>  operate within the last temporary list (keyword must be unique)

/t-restore                        list trash (refresh)
/t-restore <number...>            restore to original workspace
/t-restore --delete <number...>   permanently delete one
/t-restore --clear                permanently delete all

Input rules: pure digits = list number; session-… = id; anything else = keyword. [运行中] marks conversations with an active task (not deletable).

Uninstall

dsh plugin --profile web remove dsh-session-delete

Development

node tools/dsh-session-delete/test.mjs   # 35/35

Layout:

package.json      bundle manifest (dsh.bundle.patch)
cordis.patch.yml  loader insert for this bundle
index.js          plugin source (zero runtime dependencies)
test.mjs          unit tests

Localization

This plugin was originally written in Chinese (the default output language). An English adaptation is provided and selected by the DSH_LANG environment variable:

# English output (set before launching dsh)
set DSH_LANG=en
npx @deepseek-ai/dsh web
  • Default (no DSH_LANG): Chinese output
  • DSH_LANG=en: English output for commands, lists, success/error messages, and the /-menu command descriptions
  • Input parsing is language-independent (numbers, session-… ids, keywords all work the same)

> Testing note: the English adaptation was verified automatically by AI agents — the unit test suite covers both locales (41/41 passing: 35 Chinese + 6 English). It has not been manually exercised by a human reviewer.

Design notes

  • dsh has no public unarchive API; the plugin replays the official archive mutation in reverse through the registry's serialized mutation queue (enqueueOperationrequireStatesetState), which persists to workspace.json and broadcasts host/archived-sessions-changed so the UI updates live.
  • Trash restore re-runs header indexing so the conversation returns to its original workspace folder.
  • After deletion, the archive mark is cleaned up safely (header index rebuilt first), leaving no stale records.

License

[MIT](LICENSE)