Skip to main content

dsh-message-edit

35Stars8Forks13Issues0Watchers

Adds replayable message editing, regeneration, retry, and version branch navigation for DSH sessions, with immutable history that supports rollback.

Evidence4/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
TypeScript
Branch
main
dshdsh-plugin

Install

cmdweb profile
$ dsh plugin --profile web add dsh-message-edit

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin Moeblack/dsh-message-edit for me: review the repository at https://github.com/Moeblack/dsh-message-edit first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Description

Adds revokable message editing, regeneration, retry, and branch version navigation capabilities to DeepSeek Harness conversations. It commits each modification as an independent conversation version, keeping the original session untouched and deletable, allowing you to switch back to old versions anytime.

Core Features

  • Edit three types of text blocks: confirmed user messages, assistant thinking blocks, and assistant response blocks
  • One-click regeneration of the latest confirmed assistant response, reusing the original user input
  • Re-execute (Retry) any historical turn in the Timeline
  • Supports two cascade strategies: truncate (default, discards old follow-ups) and preserve (carries subsequent user inputs into the new branch in order)
  • Session header provides undo (←) and redo (→) buttons, switching current version by atomic effect unit
  • New Timeline tab displays complete branch tree, operation timestamps, before/after edit content, current version, and retryable turns

Technical Implementation

  • Language: TypeScript (ESM), build outputs index.mjs (Host) and client.js (Browser)
  • Key Dependencies: @deepseek-ai/dsh-agent, @deepseek-ai/dsh-session, @deepseek-ai/dsh-session-query, @deepseek-ai/dsh-workspace
  • Architecture Pattern: Cordis plugin dual-end structure. Host registers HTTP route /message-edit for timeline reading and edit execution; Client registers conversation.view and conversation.session.header.actions two slots via slots. Event sourcing: each branch appends message-edit/version events, effect/inverse pairs stored, inverse chain automatically composed by parent version
  • Entry Files: Host entry src/index.ts (apply(ctx) registers HTTP routes), Client entry src/client/index.ts (registers two UI slots)

Use Cases

When you collaborate with the model for long sessions using DSH, are unsatisfied with an old response, or want to try different branch directions at the same point with a different prompt—this plugin lets you branch from any historical turn to continue without starting a new session. The original session is always preserved and can be switched back to anytime. Ideal for power users who need to iteratively refine the same conversation structure without losing previous work.

Prerequisites & Compatibility

DependencyMin VersionNotes
DeepSeek Harness0.1.0-rc.6+Plugin built on @deepseek-ai/*@0.1.0-rc.6 types, host must satisfy this version contract
Node.jsUndeclaredRepository doesn't declare Node version in engines
Running PlatformCross-platformRepository doesn't declare os/cpu restrictions; DSH web platform itself is cross-platform (macOS/Windows/Linux)
Native ModulesNoneNo dependencies on native modules like node-pty, node:sqlite

Installation

dsh plugin --profile web add github:Moeblack/dsh-message-edit

Configuration

This plugin requires no additional configuration. Model routing (provider, model, maxTokens) is automatically read from the current session's request headers by the plugin—no manual specification needed.

FAQ

Q: Do Edit, Regenerate, and Retry operations rewrite the original session?

A: No. The plugin never rewrites Session events in place. The original session remains as an immutable append-only log, and each operation branches off a new conversation version from before the target turn.

Q: What's the difference between truncate and preserve cascade strategies?

A: truncate only re-executes the target input in the new version after branching and discards old follow-ups; preserve also carries unexecuted user inputs after the target into the new branch, running through the subsequent turn's tool chain in order.

Q: Does undo/redo really delete events?

A: No. Each operation appends an effect/inverse pair event. Undo simply switches along the inverse chain to an existing old version; the branched version is still retained in the version tree and can be switched back to.

Q: What content can be edited?

A: Only confirmed text blocks are supported—user message body, assistant thinking block, and assistant response body. Other content blocks like images, tool calls, and attachments are not editable.

Q: Does editing a message affect workspace files or artifacts?

A: No. The plugin explicitly only manipulates session events and derived Agents, with no联动 to restore or modify workspace files, command external effects, or existing artifacts.

Q: Where is the Timeline tab positioned?

A: Registered in the conversation view's conversation.view slot with order 15, positioned between Trajectory (10) and Prompt Studio (20).

Difficulty Level

Beginner — Edit, Regenerate, and Undo buttons are all visual controls, no configuration needed during conversation; understanding truncate/preserve and version branching takes a few minutes but isn't required for daily use.

Known Issues & Limitations

  • Editing images, tool calls, attachments, and other non-text blocks is not supported; only user message body, assistant thinking, and assistant response text blocks can be modified
  • Does not restore or modify workspace files, command external effects, or existing artifacts—branch switching does not rollback these side effects
  • Does not modify DSH engine, apiproxy, or official UI packages; plugin only collaborates via Host's public services and Browser slots
  • Branch operations will fail due to unresolved model routing when historical request header configuration (provider, model) cannot be located
  • Old flat version events (missing schemaVersion) can still be read and normalized during projection, but internal schema version has been upgraded to 2

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/Moeblack/dsh-message-edit)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory