Introduction

The core design philosophy behind DeepSeek Harness (DSH) is “everything is a plugin.” In real development and debugging sessions, once a user message has been sent and the AI has replied, any discovered need to correct the earlier question can usually only be handled by sending a new message or restarting the session. This breaks the continuity of the context. The dsh-message-rewrite plugin introduces a Codex-style message editing mechanism, allowing users to directly modify historical messages during a conversation and trigger the AI to regenerate subsequent replies within the same session, thereby preserving the integrity of the dialogue flow.

Plugin Overview

This is a plugin that runs in the DSH client (desktop App / Web), utilizing DSH’s profile plugin system and the Cordis framework to implement its functionality. The plugin supports in-place message editing, a floating overlay editor, edit chains, automatic forking for intermediate messages, and virtual scrolling compatibility.

  • Name: dsh-message-rewrite
  • Maintainer: zouxiaoyang
  • License: MIT

Core Features

The plugin provides the following core capabilities:
1. In-place message editing: Hover the mouse over a sent user message row to reveal an editing entry point.
2. Refined floating overlay editor: Clicking opens a centered editing card, supports adaptive dark/light themes, and allows repeated editing to form an edit chain.
3. Codex-style truncation and regeneration: After a modification is submitted, the old message and its subsequent replies are removed from the conversation surface, and the AI regenerates replies from the edited point.
4. Edit chain: Supports continuing to edit an already edited message (A → B → C); the interface displays only the final version.
5. Automatic forking for intermediate messages: If the edited message is an intermediate message (with newer user messages after it), the plugin automatically forks a new session for the rewrite, avoiding impact on subsequent conversation.
6. Virtual scrolling compatibility: Message rows are precisely bound by UUID to prevent misalignment when reusing long sessions or virtual lists.

Installation and Activation

The plugin is installed via a profile bundle and requires manually editing DSH’s configuration file.

  1. Create directory and copy files
    Create the plugin directory and copy the required files into it:
    PLUGIN_DIR=~/.dsh/profiles/web/plugins/dsh-message-rewrite
    mkdir -p "$PLUGIN_DIR"
    cp index.js client.js cordis.patch.yml package.json "$PLUGIN_DIR/"
  1. Modify configuration
    Edit ~/.dsh/profiles/web/package.json:
    • Add the following to dependencies:
        "dsh-message-rewrite": "file:./plugins/dsh-message-rewrite"
*   Add the following to the `dsh.profile.bundles` array:
        "dsh-message-rewrite"
  1. Restart service
    Install dependencies and restart the DSH server (for example, run ~/bin/dsh-server-restart), then refresh the browser page to apply the changes.

Usage

  1. In any conversation, move the mouse over a user message (a message you sent).
  2. Click the ✎ Edit button that appears at the end of the message row.
  3. In the floating editor overlay, modify the text content, then send and regenerate (or use the shortcut ⌘Enter).
  4. The old replies after that message will be hidden, and the newly edited content bubble along with the AI’s regenerated reply will appear in the original position.
  5. To continue modifying, hover over the newly generated message bubble again and click “✎ Edit Again” to form an edit chain.

Notes

  • Editing scope: The editing button is attached only to “user message” rows; AI reply rows do not currently support editing.
  • Runtime environment: It depends on DSH’s desktop App or Web profile plugin system and is not a standalone CLI tool.
  • Kernel version: The plugin targets DSH kernel version 0.1.2-rc.1; kernel APIs may change as versions evolve.
  • Configuration conflicts: cordis.patch.yml is automatically loaded via the bundle channel. Do not insert this plugin again in the main cordis.patch.yml, otherwise the webserver may crash on startup due to a routing conflict (duplicate prefix route /dsh-rewrite).

Conclusion

The dsh-message-rewrite plugin provides DSH users with a message editing experience closer to that of an IDE or modern AI client. By preserving conversation continuity and context consistency, it lowers the barrier for debugging and correcting dialogue. For more details, see the Community Directory or the GitHub repository.