Introduction¶
When adjusting prompts or modifying model responses in DSH, the common practice is to open a new branch or duplicate the entire conversation and start over. Branching consumes an additional conversation thread, while duplication easily becomes disconnected from the original context. If you simply want to edit an already-sent prompt and regenerate from that point, or correct an assistant reply’s displayed text and what the model reads—without interrupting subsequent dialogue—the client plugin dshx-message-edit maintained by callaumyan-design addresses exactly this need: edit within the current conversation, with an interface that closely mirrors the ChatGPT web version’s “edit” experience, rather than forking a new session.
What Is This¶
dshx-message-edit (npm package name dshx-message-edit, current version 1.3.0, MIT license) is a client-side plugin for DeepSeek Harness. Official summary: edit sent prompts or assistant replies within an existing DSH conversation and regenerate from that point—completed in place, without creating a new session.
Maintainer: callaumyan-design. Community directory page: SkillHub Plugin Entry; source code and documentation: GitHub Repository. The README states the target host version is DSH 0.2.0-rc.2; the backend has been tested with a real dsh-session, and the frontend has undergone load smoke testing.
Core Features¶
Below is an overview of what the plugin can do in the interface and how it relates to the conversation log (all sourced from the README).
Prompt Editing¶
- Hover over a message you sent, then click the pencil “Edit” button in the native action bar (next to “Copy” and “Branch”).
- The edit box loads the full original text; Ctrl+Enter to save, Esc to cancel.
- After saving, the system regenerates with the new prompt; the original prompt and all subsequent dialogue are hidden in the interface, replaced in place with the new prompt and new response.
- If multiple versions exist, a ‹ 2/3 › indicator appears next to the pencil, allowing you to switch between the original and various modifications.
Assistant Reply Editing¶
- Click the pencil icon in the action bar below an AI reply.
- After saving, the reply is replaced in place on screen with the modified text; the model reads this version going forward, and subsequent conversation is preserved.
- The same ‹ › controls let you view the original text or prior modifications.
Interface & Implementation Notes (for troubleshooting)¶
- The edit button styling matches adjacent native buttons (reusing the same class); user message buttons are injected via portal into the
[data-clock="start"]action row, while the reply side uses the Chat’sconversation.chat.assistant-actionsslot. - “In-place display replacement” is implemented by registering
user/assistant-steprenderers forconversation.chat.nodeat a lower priority; the wrapper still renders the host’s original component, only modifying the passed-in data. If the wrapper errors, the host’s error boundary falls back to the original renderer. - The prompt version chain relies on the host’s known
user/messageretraction annotation events (fromId/rpcIdpresent insource); when switching versions, CSS is used to hide the corresponding[data-chat-turn]turns for other versions. - When editing a prompt:
surfaceOp: replacereplaces the old prompt and subsequent nodes, thensessionController.prompt()sends the new prompt. When editing a reply: the modification is written to the sidecar file%DSH_HOME%\dshx-message-edit\overrides\<sessionId>.json(or~/.dshifDSH_HOMEis not set), and is rewritten in thellm/streamwaterfall before the request is sent (replacing only text blocks, preserving reasoning and tool-call). - Starting from v1.3.0, the plugin no longer writes custom conversation event types, to avoid unrecognized events causing the entire session to fail with “history load error”; older logs containing v1.2.0’s
dshx-message-edit/prompt-editanddshx-message-edit/overridemust be patched withignorable: trueto remain readable.
Installation & Activation¶
The plugin is categorized as a client-side plugin on SkillHub, supporting web and desktop profiles; after installation, DSH must be restarted (requiresRestart: true in package.json).
For Web and Desktop, use the commands from the README (Desktop requires fully quitting DSH Desktop from the system tray first, then using its bundled dsh):
# Web profile
dsh plugin --profile web add github:callaumyan-design/dshx-message-edit
# Desktop (use the dsh command bundled with DSH Desktop, after fully quitting Desktop from the tray)
dsh plugin --profile desktop add github:callaumyan-design/dshx-message-edit
Uninstall:
dsh plugin --profile <profile> remove dshx-message-edit
The DSH ecosystem emphasizes “everything is a plugin”; SkillHub is a community directory site with no official affiliation with DeepSeek or 幻方 (High-Flyer). Before installing, it is recommended to review the repository source code and the MIT license; the plugin runs under the permissions of the current dsh process.
Typical Usage Comparison¶
The README summarizes targets, operations, and effects in a table for self-testing:
| Target | Action | Effect |
|---|---|---|
| Your prompt | Hover → pencil in action bar | New prompt regenerates; original prompt and subsequent dialogue are hidden, new content displayed in place; ‹ › switches back to view old versions |
| AI reply | Pencil in action bar below reply | Reply displayed in place as modified text; model reads this version; subsequent conversation preserved; ‹ › views original or prior modifications |
/state is read-only and will not restore cold sessions; cold sessions read logs via sessionController.inspect(), and historical versions remain switchable.
Use Cases & Caveats¶
Suitable for: Making small prompt corrections within the same DSH conversation and re-running from that point; needing the model to “see” a rephrased assistant reply without losing the content already discussed afterward.
Known limitations (verbatim from the README):
- Version switching only changes the display; the model always reads the latest version. If you need the model to continue based on an older version, you must edit again.
- Correcting a prompt retains only text; attachments such as images in the original message are not carried over to the new prompt.
- After uninstalling the plugin, conversations still load; the interface and model side revert to the original replies (reply modifications in the sidecar file no longer take effect).
- Reply modifications exist in a local sidecar file; simply copying the conversation log elsewhere will not carry these modifications along.
- Editing a prompt during generation will first stop the current generation.
Conclusion¶
dshx-message-edit brings “change a sentence, re-run from this point” and “change a reply, keep chatting afterward” into a single DSH conversation, with the action bar and version switching designed to align with common chat product conventions. For installation commands, implementation details, and v1.3.0 log compatibility notes, refer to the repository README.
- Directory page: https://www.skillhub.cn/plugins/callaumyan-design/dshx-message-edit
- GitHub: https://github.com/callaumyan-design/dshx-message-edit