dsh-edit-turn: In-place Edit Messages Plugin for DeepSeek Harness

Preface

DeepSeek Harness (DSH) session logs are append-only event streams. Once a prompt or a model response contains an error, the incorrect information remains in the context and pollutes every subsequent conversation turn. The official implementation currently only offers summary-style compression (/compact), and lacks a mechanism to “edit that previous message and try again”. The dsh-edit-turn plugin fills this gap: it allows messages to be edited in place, and uses the official surface-replace contract at the underlying layer to perform the replacement. No model call is triggered when saving.

What Is This

dsh-edit-turn is a DeepSeek Harness plugin maintained by DDDMUC. It implements in-place editing of any message in the conversation: modifying a prompt directly replaces that message, while modifying a model response replaces the response content and then rolls back and replays the subsequent turns. The plugin does not modify the original byte log, but instead achieves this by appending replacement events.

Core Features

  • In-place message editing: supports editing user messages (direct replacement) and model responses (replace, then replay subsequent turns).
  • Official contract: performs replacement using the official surface-replace contract; saving does not trigger a model call.
  • Attachment editing: supports editing messages with attachments (0.2.19+), preserving unmodified attachment blocks.
  • Rerun integration: works together with the sister plugin dsh-rerun-turn to provide a “Rerun” button in the editor, used to regenerate that turn of conversation.
  • Interface and interaction: supports a bilingual (Chinese/English) UI, skin-friendly opaque panels, and keyboard shortcuts (Enter to save, Esc to cancel).

Installation and Activation

Before installation, ensure the environment meets the dependency requirements: Node.js >= 22, and the dependencies @deepseek-ai/schemastery as well as specific versions of dsh-settings and dsh-tools are installed.

dsh plugin --profile web add dsh-edit-turn

After installation, restart the DSH process for the corresponding profile to enable it.

Typical Usage

  • Edit a user message: hover over the user message you want to change, click the edit icon (pencil) on the right, modify the text, and save. Only this message is replaced; the replies below and the subsequent conversation remain unchanged.
  • Edit a model response: hover over a model response, click the edit icon, modify the text, and save. This response is replaced, and the turns after it are first rolled back and then replayed event by event into place.
  • Rerun the conversation: after installing dsh-rerun-turn, click the “Rerun” button in the editor; it first saves the changes, then regenerates this turn of conversation using the modified content.

Notes and Applicable Scenarios

  • Version dependency: dsh-rerun-turn must be installed to use the rerun feature.
  • Functional limitation: tool calls and thinking processes in model responses cannot be preserved (only text is retained), because the results of those tool calls no longer hold.
  • Permission requirements: the plugin runs with the permissions of the current DSH process; review the source code and license before installing.
  • Configuration option: saving defaults to “execute on a single click”; a secondary confirmation can be enabled via configuration.

Summary

dsh-edit-turn provides the “in-place editing” capability that DSH lacks natively. Through the official surface-replace mechanism, it modifies conversation history without calling the model, and combined with dsh-rerun-turn it implements a complete “edit-and-rerun” workflow. It is suitable for developers who need to fine-tune prompts or correct model responses.

  • Plugin directory: https://www.skillhub.cn/plugins/DDDMUC/dsh-edit-turn
  • GitHub repository: https://github.com/DDDMUC/dsh-edit-turn
羽毛球分组比赛记分
小程序二维码

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

Xiaoye