dsh-rewind-plugin: Message Recall

Introduction

The native behavior of DeepSeek Harness (DSH) does not support editing or recalling sent messages. The dsh-rewind-plugin solves this pain point by rewinding the conversation surface to a state before a sent message, hiding that message and all content following it, and placing the original text back into the editor.

What is it

Maintained by JochenYang, this plugin is designed to provide message recall capabilities for DSH. It treats a selected user message as a “boundary,” hides that message and subsequent content, and allows you to resend using the original text.

Installation and Activation

Web Profile

Install using the command line:

dsh plugin --profile web add @jochenyang/dsh-rewind-plugin

You can also directly use the release package URL or repository address:

dsh plugin --profile web add https://github.com/JochenYang/dsh-rewind-plugin/releases/latest/download/dsh-rewind-plugin.tgz
dsh plugin --profile web add github:JochenYang/dsh-rewind-plugin

Desktop Profile

The official desktop client does not support command-line installation. You need to install it within the application: Settings -> Plugins -> Add plugin. Enter @jochenyang/dsh-rewind-plugin in the “Package name or address” field, and restart the application after installation.

Basic Usage

Command Line

  • List recallable messages: /rewind
  • Recall the nth message: /rewind <n>
  • Preview recall effect (dry run): /rewind plan <n>

Interface Interaction

Hovering over a user message in the conversation transcript will display a recall icon.

Core Features

  • Editor Pre-fill: After recall, the text returns to the input box for you to re-edit or send.
  • Quarantine Management: In Settings -> Recall quarantine, all overwritten files and bytes are moved to a quarantine area rather than being directly deleted. They can be cleaned up by session or line.
  • File Preservation: Files created within the recalled scope are moved to the quarantine area instead of being unlinked.
  • Log Integrity: Session logs are append-only. The recall operation appends an event, ensuring no original data is lost.

Notes

  • Compaction Limit: The recall operation stops at the most recent compaction point. Compaction replaces history summaries, making it impossible to rewind past it. The /rewind command will explicitly indicate this boundary.
  • State Declaration: If the recall cannot cover all content, the plugin will explicitly notify you rather than claiming a complete rewind.
  • Runtime Dependencies: The plugin relies on DSH built-in packages at runtime (e.g., @deepseek-ai/cordis, @deepseek-ai/dsh-session, etc.) and does not pin specific versions, allowing it to run on different versions of DSH.
  • Write Permissions: Only one writer is allowed in a session at any given time; this is an underlying mechanism of DSH.

Summary

By implementing rewinding at the session log level via the surfaceOp: { op: 'replace' } mechanism, this plugin ensures data readability and integrity. Meanwhile, it manages file changes through a quarantine area, making it suitable for scenarios where corrections to sent messages are required within DSH.

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

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

Xiaoye