DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-plugin-session-delete

c

dsh-plugin-session-delete

Manifest valid1

Delete the current session from the conversation header — removes the live session and its persisted directory

UI (client)hasBundlePatch

dsh-plugin-session-delete

给 DeepSeek Harness (dsh) 补上删除会话能力 —— 入口只有一个:会话页面顶部 Session log 左边的「Trash」胶囊按钮(垃圾桶图标 + 文字,与 Session log 同款式同排设计),删除当前会话。

它解决什么问题

dsh 0.1 没有删除会话的功能:侧边栏三点菜单只有 重命名 / 分叉 / 归档,API 没有 delete 路由,JSONL 持久层是 append-only 的。归档只是隐藏,数据一直留在磁盘上。这个插件把删除补齐:同时移除内存中的会话和 ~/.dsh/sessions/<项目>/<会话ID>/ 磁盘目录,删除后会话从所有打开的页面上实时消失,重启后也不会复活。

工作原理

dsh 的三点菜单(重命名/分叉/归档)是内置前端的硬编码数组,没有开放插槽;会话头部的工具区有官方开放插槽 conversation.session.header.utilities(Session log 就在那里),删除按钮注册在同一排:

  • 宿主端(本插件的 node 半边):注册设置命名空间 session-delete 作为删除队列(内部通道,不在设置页渲染卡片);浏览器把会话 ID 写进 pending,宿主逐个处理 —— 从会话仓库摘除(触发 session/disposed 事件,API 代理会把它推给所有打开的客户端,侧边栏实时移除),再删除磁盘目录。
  • 浏览器端(本插件的 web 半边,经 dsh.client 声明分发):在会话头部 conversation.session.header.utilities 插槽注册 Trash 按钮,删除当前会话

使用

打开会话 → 顶部标题行、Session log 按钮左边 → Trash → 确认 → 会话删除,界面自动切走。

删除会同时从列表和磁盘上消失;正在运行的会话会被强制终止。设置页没有删除入口。

环境要求 / 安装 / 卸载

# 从 GitHub 直接安装(推荐)
dsh plugin --profile web add github:chuling-lingling/dsh-plugin-session-delete

# 卸载
dsh plugin --profile web remove dsh-plugin-session-delete

安装后重启 dsh web 即可生效。前置要求:dsh 0.1.x、pnpm(npm install -g pnpm)。

安全设计

  • 会话 ID 先过白名单校验(session- 前缀 + 受限字符集)才会接触文件系统,没有路径注入面
  • 删除"刚创建的会话"时目录可能晚于删除落盘,插件会延迟复查一次,保证目录不会漏网
  • 单次队列上限 50 个,处理结果写入 log(最近 50 条,在 ~/.dsh/settings.yamlsession-delete 段)供核查
  • 一切失败(会话不存在、目录缺失、删除出错)都降级为日志行,不会中断队列

已知边界

  • 删除不可恢复,确认弹窗是唯一防线
  • 侧边栏三点菜单(重命名/分叉/归档)是内置前端的硬编码菜单,插件体系没有开放插槽;删除按钮放在了会话头部操作区
  • 头部按钮只在非空白会话显示(空白会话的头部本身是隐藏的);空白会话发一条消息后即可删除
  • 当前打开着的、被删除的会话,其聊天视图会随之失效并自动切换
  • 没有批量列表:要删其他会话,打开那个会话再点 Trash,彻底程度与原先设置卡片相同(同一条删除队列)

包内容 / 发布

lib/index.js(宿主半边)+ lib/client.js(浏览器半边)+ cordis.patch.yml + package.json(dsh.bundle 注册插件行,dsh.client 声明浏览器模块)。发布流程与 reasoning-efforts 插件一致:npm pack --dry-run 检查后 npm publish

变更记录

  • 0.3.0 去掉设置页「会话删除」卡片;只保留聊天页 Trash,删除仍走同一队列(内存 + 磁盘)
  • 0.2.2 按钮移入 Session log 所在的头部工具插槽,两者同排相邻,间距精确 1cm(38px)
  • 0.2.1 按钮改为与 Session log 同款的胶囊设计(垃圾桶图标 16px + “Trash” 文字,悬停效果,与 Session log 保留间距)
  • 0.2.0 新增会话头部删除按钮(Session log 左边的垃圾桶小按钮,官方 conversation.session.header.actions 插槽)
  • 0.1.0 初始版本:设置卡片 + 删除队列;内存摘除 + 磁盘目录删除;创建窗口边缘情况的延迟复查

许可证

MIT

Comments

Loading…

From the same category

open-design

by nexu-io

🎨 Best DeepSeek Harness Design Plugin. The open-source Claude Design alternative. 🖥️ Local-first desktop app. 🖼️ Your coding agent becomes the design engine: prototypes, landing pages, dashboards,

Development & InfrastructureTerminal & ClientsUI & ExperienceManifest valid

97.9k

Apache-2.0

TypeScript

Sep 24, 2026

Index only — not installable

by Molunerfinn

:rocket: The Ultimate Image Uploader for Efficient Creators. Supports Obsidian, Typora, VS Code etc. and 60+ image hosting services (S3, GitHub, Cloudflare R2, Imgur, Aliyun OSS...). Paste, upload, d

Terminal & ClientsVision & Multimodal

27.2k

MIT

TypeScript

Sep 24, 2026

Index only — not installable

by YaoApp

✨ All your agents and workspaces in one place, on every device you own. Track tasks on a board, accessible from desktop, mobile, browser, or API. Self-hosted.

Terminal & Clients

8k

Go

Sep 23, 2026

Index only — not installable

by zhu1090093659

DeepSeek Harness (DSH) Web Plugin Aggregation Ecosystem · Everything is a plugin, distributed via the Creative Workshop

Tools & CapabilitiesTerminal & ClientsDevelopment & InfrastructureModels & ProvidersUI & ExperienceManifest valid

8k

Apache-2.0

TypeScript

Sep 24, 2026

dsh plugin --profile web add dsh-web

by omdsh-dev

开放的侧边栏底座,支持三方拓展注册新侧边栏页面。内置文件渲染编辑/终端/侧边对话/Git/子代理页面 | Open sidebar foundation, supports third-party extensions to register new sidebar pages. Built-in file rendering/editing, terminal, side chat, Git,

Terminal & ClientsUI & ExperienceWorkflow & AutomationManifest valid

3.7k

43.9k/wk

MIT

TypeScript

Sep 23, 2026

dsh plugin --profile web add dsh-better-sidebar

by ccch1mneyyy

DSH 官方公众号收录的 TUI 补位插件:Claude Code 风,鲸鱼顶栏/实时状态/流式思考/双击 Esc 回滚/上下文进度+TPS。npm 一键装。 DSH official WeChat featured TUI plugin — Claude Code style: whale bar, live status, streaming thoughts, double-Esc rol

Terminal & ClientsUI & ExperienceManifest valid

3.2k

5.5k/wk

MIT

TypeScript

Sep 24, 2026

dsh plugin --profile terminal add @deepseek-harness-tui/dsh-tui