kagurazakayashi/dsh-delete-session ↗★ 0

@kagurazakayashi/dsh-delete-session

在会话菜单中添加删除选项并支持确认模式 适合需要快速删除会话,并希望自定义防误触确认机制的Web端用户。

包名
@kagurazakayashi/dsh-delete-session
兼容性
待验证
Harness 依赖范围
>=0.2.0-rc.1 <0.3.0-0
Cordis 依赖范围
^4.0.1
版本
1.2.2
许可证
MIT
最近更新
2026年10月6日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:kagurazakayashi/dsh-delete-session

Usage (delete confirmation modes)

The confirmation mode comes from the plugin's settings card; click-again is the default.

click-again — two-step confirmation with no dialog:

First click "Delete session"
        │
        ▼
The item turns into a red warning state "Click again to delete"
        │
        ├─ not clicked again within 8s ──▶ reverts to normal "Delete session"
        │
        └─ clicked again within 8s ──▶ calls POST /delete-session/delete
                                            │
                                            ├─ session is running ──▶ 409 refused, error notice
                                            │
                                            └─ idle session ──▶ archive → rm session directory
                                                                   │
                                                                   ▼
                                                              200 OK, refresh lists

dialog — the menu closes and a confirmation dialog appears; only its confirm button deletes:

Click "Delete session"
        │
        ▼
Dialog: Permanently delete the session "…"?   [Cancel] [Delete]
        │
        ├─ Cancel / Escape / click outside ──▶ nothing is deleted
        │
        └─ Delete ──▶ calls POST /delete-session/delete (same checks as above)

instant — the first click deletes immediately, with no confirmation at all:

Click "Delete session" ──▶ calls POST /delete-session/delete (same checks as above)

All three modes end in the same route, so the running-session refusal (409) and the auto-archive-then-remove behaviour are identical.