Da-Mie / dsh-delete-session

목록에 있음

DSH Web UI plugin: delete sessions from the menu and manage archived sessions (restore / permanent delete)

main도구세션 소스 보기

설치

npx -y @deepseek-ai/dsh plugin --profile web add github:Da-Mie/dsh-delete-session

이 설치 명령은 GitHub 저장소 주소에서 생성된 확인되지 않은 시작점입니다.

README

유지 관리자가 작성한 문서 스냅샷입니다.

GitHub에서 보기 ↗
커밋 5d2d45d동기화 2026. 8. 18.

dsh-delete-session

License: MIT DeepSeek Harness

Delete sessions and manage archived sessions in the DeepSeek Harness (DSH) Web UI.

中文说明见 README.zh.md

Adds Delete session to every session row's menu (below Rename / Fork / Archive), plus a View archived sessions toolbar button that opens a DSH-native window for restoring or permanently deleting archived sessions.

Screenshots

⋯ menu with Delete session

Delete confirmation

⋯ menu with Archive session

Archived sessions window

Quick start

dsh plugin --profile web add github:Da-Mie/dsh-delete-session

Restart DSH and refresh the Web UI. Every non-blank session's menu now has Delete session, and the sidebar toolbar shows View archived sessions between View options and Add workspace.

Features

Delete a session (⋯ menu)

  • Delete session item below Archive session in every non-blank session row's ⋯ menu, using the official trash icon.
  • Shows a confirmation dialog before deleting.
  • On confirm:
    1. cancels and waits for a running agent (if any);
    2. archives the session first so it disappears from the sidebar immediately;
    3. removes the session's persisted JSONL directory (permanent).
  • Best-effort refreshes the session/workspace lists so cold sessions also leave search/list right away.

Archived sessions manager (toolbar)

  • View archived sessions button between View options and Add workspace, using the official archive icon.
  • Opens a DSH-native modal (the official Modal primitive) listing every archived session: title, workspace, working directory, and last-update time.
  • Restore — returns the session to the workspace it was archived from; all timestamps and the session's files are kept, because archiving never touches workspace accounting or the session log.
  • Delete permanently — two-step confirmation, then removes the session's persisted log and drops it from the archive set.

Requirements

  • DeepSeek Harness ≥ 0.1.0-rc.5 (Web UI profile; check with dsh --version)

Installation

The package ships prebuilt (lib/ is committed), so no build step is needed.

Install with DSH (AI)

Just hand this repository URL to your DSH agent:

https://github.com/Da-Mie/dsh-delete-session

DSH reads the repository's AGENTS.md and installs the plugin automatically.

From GitHub

dsh plugin --profile web add github:Da-Mie/dsh-delete-session

Or manually: link this directory into $DSH_HOME/profiles/node_modules/dsh-delete-session, register it in profiles/web/package.json under dependencies and dsh.profile.bundles, then restart DSH.

After installing, restart DSH (plugin-set changes take effect on restart), then refresh the Web UI.

How it works

  • Host side — registers /dsh-delete-session <sessionId>, /dsh-archived-restore <sessionId> and /dsh-archived-delete <sessionId>. Delete cancels/waits for the agent, flushes the session, calls workspaceRegistry.archiveSession to hide it, then locates and removes the session directory via sessionPersistence.locate. Restore drops the id from the registry-global archive set — archiving never touches workspace accounting, so unarchiving restores the session's position, timestamps, and files.
  • Client side — uses a MutationObserver to inject the Delete session menu item (cloned from the native Archive item) and the View archived sessions toolbar button (anchored to the stable View-options button, self-healing against React re-renders, with a CSS fix for the fixed-width header-actions row). The management window renders with the official Modal primitive through the shell.overlay slot.

Notes

  • DSH's official session storage has no delete API; this plugin performs the documented out-of-band maintenance of removing the JSONL log directory. For live in-memory sessions it also best-effort detaches them from the session and agent registries so the log is not recreated by a later shutdown flush. If the internal detach fails, the session is still archived/hidden and residual logs may need manual cleanup.
  • Deletion is permanent and cannot be undone.
  • If no session context is available to run the host command (e.g. no opened session at all), the dialog reports that the command cannot run.
  • If the log file is locked by a live session and removal fails, the session is still archived/hidden first and the command returns an error; the residual log may need manual cleanup.

License

MIT

프로젝트 파일 및 신호

표시된 항목은 디렉터리 스냅샷에서 감지된 공개 저장소 신호입니다.

문서감지됨

저장소 정보

언어
JavaScript
라이선스
MIT
최신 릴리스
v0.1.0
마지막 업데이트
2026. 8. 17. AM 4:11

신중하게 설치하기

소스 코드, 권한, 수명 주기 스크립트, 의존성 및 네트워크 접근을 검토하고 신뢰하지 않는 플러그인은 격리 환경에서 테스트하세요.