dsh-session-editor: Deleting Sessions and Directly Editing Conversations in DSH Web UI

Preface

DeepSeek Harness (DSH) session logs are append-only: you cannot modify a specific turn in-place like a standard document, and the sidebar typically only offers “archive and hide” rather than the ability to completely purge a session from disk. If you run the Harness locally, experiment with prompts frequently, or fork sub-sessions, your sidebar can become cluttered with records you “definitely don’t want to see again.” Furthermore, if you want to resend a message after a specific turn or modify your own input, you are forced to start a new session and manually copy content, which incurs a high cost.

Community maintainer wodebilu’s dsh-session-editor is an unofficial plugin for the DSH Web interface (not affiliated with DeepSeek). It adds options to the session row menu and conversation bubbles for deletion, regeneration, resending with edited prompts, truncating subsequent turns, and editing one’s own messages. Its behavior is similar to SillyTavern’s “Direct Edit,” but its implementation works by forking a new session and permanently deleting the original, rather than rewriting the JSONL file itself.

The following section covers the plugin’s positioning, capabilities, installation, and usage, as well as notes regarding deletion vs. archiving and upgrade compatibility.

What is this?

  • Name: dsh-session-editor (npm package name matches repository name)
  • Maintainer: wodebilu
  • Category: Client (platform: web, injects into conversation and workspace-related UI modules)
  • Version (package.json): 0.1.2, MIT License
  • Summary: Permanently delete sessions in DSH, regenerate completed responses, edit specific turns, or edit and replace your own user messages.

The plugin has no third-party runtime dependencies, performs no network calls, and collects no telemetry. On the Host side, it is pure ESM and requires no build step.

Core Features

The capabilities listed in the documentation can be summarized into the following categories (all triggered via the Web UI or command line):

Operation Entry Point Behavior Summary
Permanently delete session Session row … → Delete session permanently… Validates artifact path, archives, stops running tasks, then erases the directory from disk; requires checking “I understand this cannot be undone”.
Regenerate Action row below finalized response Confirmation → Fork new session before that turn → Resend with same prompt → Open new session → Permanently delete original session.
Edit prompt and resend Same action row as above Confirmation + Text editor → Create new session with edited prompt → Permanently delete original session.
Delete this turn and subsequent ones Same action row as above New session ends before that turn → Permanently delete original session.
Edit my input Hover over user message bubble Copy / Edit own message; follows the same “replace session and delete original” flow.

Difference between Deletion and Archiving (Explicitly compared in the README):

Deletion Archiving
Session Data Permanently removed from disk Retained
Recoverability No Can be unarchived
Sidebar Removed from list Removed from list
Frees Disk Space Yes No

If the goal is simply to “not see it in the sidebar,” archiving should be preferred. Use permanent deletion only when you are certain you need to free up space and accept that it is irrecoverable.

Implementation of “Direct Edit”: DSH does not support in-place rewriting of logs. Every edit forks a replacement session before the target turn (preserving the title). After opening the new session, the source session is permanently deleted. Consequently, the session ID changes, the sidebar row is replaced, and there is no branch history to roll back to. Deletion implies “truncating from that turn onwards”; you cannot delete just a single message in the middle. Modifying text triggers a regeneration of the response, rather than a pure text replacement. Editing messages with attachments will trigger a warning and require secondary confirmation, as the log stores attachment IDs and the prompt endpoint only accepts newly uploaded content.

Deletion Safety Flow (Host side, attempts to avoid state changes upon failure): Parses paths via sessionPersistence.stat, rejects deletion if subagent child sessions are still present, validates directory hierarchy and session*.jsonl[.zstd] files. If running, it stops the session first (max wait 15 seconds), then flushes, erases the directory, clears projection caches, and finally archives the sidebar row. Path resolution failures occur before any state changes. The plugin does not write to workspace.json.

Installation and Activation

The installation method provided in the README is as follows (Do not use the npm package name dsh-session-toolkit, that is a different plugin; if you have previously installed @local/dsh-session-toolkit or dsh-session-toolkit, remove it first under Plugins → Installed plugins to avoid duplicate registration for the same UI slot).

Install from GitHub:

  1. DSH Sidebar → Plugins → Add plugin
  2. Paste the repository address, or execute in your local shell:
dsh plugin --profile web add github:wodebilu/dsh-session-editor

You can also paste the following in the interface:

https://github.com/wodebilu/dsh-session-editor
  1. Restart DSH once after installation is complete.

Local Folder or ZIP: Extract to a fixed path, paste the absolute path of the folder containing package.json into “Add plugin”, then install and restart. Folder installation acts as a link: dependency; do not move or delete that directory afterwards. Git/tarball installations copy files to the profile, allowing you to move the installation source freely.

Environment Requirements (README): Tested on DSH 0.2.1-rc.2; Node >=22. The Client relies on internal DSH slots and the conversation.chat.user.content factory; Harness upgrades may require plugin updates.

Typical Usage

  1. Delete entire session: Session row … → Delete session permanently… → Check confirmation box → Confirm.
  2. Modify turn / Regenerate / Truncate: Hover over the action row below the finalized response → Pencil / Trash / Regenerate icon → Confirm according to prompts.
  3. Modify own message: Hover over user bubble → Copy or Pencil edit.
  4. Command Line Deletion (Executable in any session; also used internally by menus and replacement flows):
/session-editor delete <sessionId> --confirm

Without --confirm, it only returns usage instructions and does not modify any session, preventing accidental deletion via paste. The delete command is recorded in the log as a standard command line; during self-deletion, the Host waits for command lifecycle persistence before erasing the directory.

Configuration: No configuration options required. The maximum wait time for stopping running sessions is fixed at 15 seconds and is not exposed as a configurable item.

Use Cases and Notes

Who it is for: Developers using the DSH Web UI locally or in self-managed environments who need to clean up session directories on disk, or who want to “edit prompt / regenerate / delete subsequent turns” on specific rounds. It is not suitable for treating permanent deletion as “revocable cleanup”—the README repeatedly emphasizes: No Trash, No Undo; archive first if unsure.

Permissions and Trust: The plugin reads and writes to session directories and registered services (commands, agents, sessionPersistence, workspaceRegistry, etc.) with the current DSH process permissions. Before installing, review the GitHub Repository source code and MIT License to ensure it meets your acceptance criteria for unofficial extensions. The README states there is no warranty; back up important conversations yourself.

Compatibility Risks: The plugin registers the user key for conversation.chat.node to add hover actions; if the Harness changes this node contract, it may affect user message rendering. The Host uses feature detection for the JSONL backend’s listArtifacts() and root; if Harness removes these in the future, it may fall back to $DSH_HOME/sessions, but parsing might still fail, resulting in a “fail-closed” state.

The DSH ecosystem emphasizes “Everything is a Plugin”; the SkillHub Directory Page is a community collection site and has no official affiliation with DeepSeek / High-Flyer. This article describes a community plugin, not an official product specification.

Conclusion

dsh-session-editor fills the gaps in DSH’s default Web UI regarding “session-level permanent deletion” and “per-turn fork replacement.” Operations are centralized in menus and bubbles, and the deletion path includes multiple validations, but the decision remains yours—think clearly about whether to use archiving before permanently deleting.

  • Directory Page: https://www.skillhub.cn/plugins/wodebilu/dsh-session-editor
  • Source Code & Full Docs: https://github.com/wodebilu/dsh-session-editor (Includes Chinese README)
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye