dsh-turn-delete: Delete a Single Turn from a DSH Session Without Deleting the Session

When using DeepSeek Harness, if you only need to correct a particular response or tool call in the conversation history, the typical solution is to restart the session. This loses subsequent context. The dsh-turn-delete plugin provides the ability to precisely delete a single turn.

What Is It

This is a Memory-class plugin maintained by TiJun-Prime. It allows deletion of completed top-level turns without deleting the session itself. Deleted turns are removed from subsequent model context, while the session ID, title, workspace association, subsequent turns, and the original append-only event log are all preserved.

Core Features

  1. Show delete button: A trash can button appears next to the last assistant reply for a completed top-level turn (not shown for subagent sessions).
  2. Confirmation mechanism: Deletion must be confirmed.
  3. Instant effect: After successful deletion, the turn’s row is hidden in place, without needing to switch away from and back to the session.
  4. Persistence: A persistent tombstone mechanism ensures deleted turns do not reappear after refreshing the page or restarting the profile.
  5. Safe scope: A Session’s system prompt node is never included in the deletion range.
  6. Idempotency: Repeatedly submitting the same deletion is safe.
  7. Error handling: For incomplete turns or turns that have already been collapsed into a compaction summary, the plugin refuses deletion and explains the reason.

Installation and Enablement

Install from GitHub (requires corresponding credentials already available locally):

dsh plugin --profile web add github:TiJun-Prime/dsh-turn-delete

After installation, restart dsh web (desktop version requires restarting the app) or re-enable the plugin in the plugin panel.

Typical Usage

  1. In the conversation UI, find a completed top-level turn that shows a trash can icon.
  2. Click the trash can icon.
  3. Confirm deletion in the confirmation dialog that appears.

If the button disappears after upgrading the kernel, you can re-enable this plugin in the plugin panel or simply restart the app.

Use Cases and Notes

  • Permissions and security: The plugin runs with the Harness process’s permissions. Review the source code before installation. Deletion only changes model context; the original append-only event log is preserved for audit and replay.
  • Compatibility: Supports DeepSeek Harness 0.1.5-rc.2 and 0.2.0-rc.1. Requires Node.js 22.19 or higher. Supports the Web profile and web-based desktop wrappers.
  • Dependency maintenance: This plugin maintains compatibility with hanshenmesen/dsh-turn-delete.

Conclusion

This plugin solves the pain point of adjusting conversation context while preserving session structure, and is suitable for developers who need fine-grained management of conversation history. For more details, refer to the GitHub repository or the plugin directory page.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye