Preface¶
After running long conversations in DeepSeek Harness (DSH) Web, a common need arises: a prompt in a certain turn was written incorrectly, and you want to tweak a few words and have the model re-run from that turn; or you want to fine-tune the wording of a final answer without hard-deleting the entire conversation after it to roll back. The host-side conversation log is append-only, with no public primitive for “rolling back to turn N and rewriting in place”. If you only modify the display in the UI without touching the persisted events, it will be out of sync with the real prompt history; if you crudely delete the latter half, the provider-side prompt prefix cache may be invalidated across the whole segment.
The following introduces the community plugin dsh-message-edit (maintainer lxl8182), which adds edit entry points in the Web client for user messages, AI final answers, and outgoing steering bubbles, following the host-supported “copy prefix → new session → archive old session” path, and keeps the copied prefix as byte-for-byte identical as possible to inherit prompt caching.
What This Is¶
dsh-message-edit is a client-side plugin for DSH Web (category: client): it inserts pencil buttons on user bubbles, AI answers, and the outgoing queue. After editing text, it splits the conversation according to rules: the original conversation is archived (recoverable via “Archived” in the sidebar), and a new conversation carries the same prefix and continues (editing a user message resends; editing an AI answer does not automatically resend).
- Directory page: skillhub.cn/plugins/lxl8182/dsh-message-edit
- Source code and docs: github.com/lxl8182/dsh-message-edit
- License: MIT (see the repo README)
- Current package version: 0.1.0 (subject to the repo’s
package.json)
The DSH ecosystem emphasizes “everything is a plugin”; community directories like SkillHub are independent sites and have no official affiliation with DeepSeek / High-Flyer.
Core Features¶
User Messages: Edit and Resend¶
Insert a pencil button into the user bubble action row (the same row as copy, clock). Open it to modify that turn’s prompt; after confirmation, the conversation becomes: byte-for-byte identical prefix of turns 1..N-1 + new prompt; that turn and all older content after it no longer appear in the current conversation, and a resend to the model is triggered (relative to the edited prompt).
The card is annotated: content after that turn will be discarded, and the original conversation will be archived.
AI Messages: Edit Only the Final Answer, No Resend¶
Insert a pencil button into the AI answer action row (the official conversation.chat.assistant-actions slot, same row as copy, branch). What is modified is the text of the last assistant/message of an already-closed turn; the split point is at that turn’s turn/end, the prefix is copied byte-for-byte, and only the target message’s text block is replaced (reasoning, message.id, usage, stream, etc. are preserved as-is). No automatic resend after confirmation; you may continue the conversation afterwards.
Intermediate steps, answers containing tool-calls, and running unclosed turns are not editable; the host returns corresponding error codes (e.g. assistant-message-has-tools, assistant-message-not-final, etc.).
Outgoing Messages: Edit the Queue, No New Session¶
Insert a pencil button on steering bubbles not yet sent to the model ([data-pending-steering]), editing the queue content in place via the official session.updateQueue. When attachments or non-plain-text are present, the button may still appear, but clicking will indicate it is not yet supported.
Why “In-Place Rollback” Is Not Possible and a New sessionId Is Required¶
The README explains: the conversation persistence interfaces only have create / open / flush / stat / list, with no delete or rewriting of committed bytes; there is also no public path to release a running Session and rebuild it with the same id. The plugin therefore adopts:
Copy prefix to a new session → let the official host acknowledge the session → deliver the new prompt (user message) → archive the old session
The prefix is copied byte-for-byte as-is because provider-side prompt caching relies on prefix hits; once the prefix is altered, the entire cache becomes invalid. The split point falls back to a “clean” position (no unclosed turn/step/compaction, no dangling tool calls, inbox queue empty, etc.); for specific rules see the “Split-point rules” section in the repo.
Installation and Activation¶
The plugin targets the DSH Web profile, with zero build and zero extra npm dependencies (lib/index.js / lib/client.js are hand-written JS). Requires Node >= 20.
- Install from GitHub (command from the repo README):
dsh plugin --profile web add github:lxl8182/dsh-message-edit
Or install from a local directory:
dsh plugin --profile web add /path/to/dsh-message-edit
-
Restart the web host. The client module graph is assembled only once at boot, and HMR does not recognize new packages.
-
Refresh the browser.
Optional self-check (the README notes no host restart is needed to run this):
cd ~/.dsh/profiles/web && node --input-type=module \
-e "const m = await import('dsh-message-edit'); console.log(Object.keys(m))"
# expected [ 'apply', 'inject', 'name' ]
Typical Usage¶
After installation, host restart, and page refresh, find the pencil button in the conversation UI; no extra configuration files are needed.
Change a Prompt in a Certain Turn
- Click the pencil in the target user bubble action row.
- The editor is pre-filled with the original text; after editing, the button becomes “Edit and resend”, otherwise “Resend”; it is disabled when blank or over 100,000 characters.
Ctrl/Cmd + Enterto submit;Esc, clicking outside the card, or “Cancel” to close.- After confirmation, switch to a new session (
ctx.uiWorkspace.openSession); the old session enters the sidebar’s “Archived”.
Change a Final AI Answer
- Click the pencil in the action row of the last answer in an already-closed turn.
- Edit the text under the same rules and confirm; it will not automatically call the model again; you need to continue the conversation yourself.
Change Outgoing Steering
- Click the pencil on the pending bubble to directly edit the queue text (plain-text scenario).
The host side also registers HTTP POST endpoints (local, with no authentication like other HTTP surfaces in DSH) for the frontend to call, e.g. for user messages: /dsh-message-edit/prepare, /dsh-message-edit/rewrite; for AI answers: /dsh-message-edit/prepare-assistant, /dsh-message-edit/rewrite-assistant. See the README “API” table for input and return fields.
Use Cases and Caveats¶
Who It Suits
- Developers who frequently run long conversations in DSH Web and need to “change the prompt from a certain turn and re-run” or “only tweak the final answer wording”.
- Those who want old logs fully preserved and recoverable via archiving, rather than pretending in the UI that history never happened.
Please Be Aware Before Using
- The plugin runs under the permissions of the current dsh process; before installing, it is recommended to read the source code and the MIT license, and judge whether to trust the maintainer lxl8182 yourself.
- Only plain-text user/AI editable paths are supported; images, files, and other non-text blocks will return
unsupported-content. - Synthetic turns (goal continuation,
agent.inject(), etc.—turns without human prompts) are not editable, returningsynthetic-turn. - After the operation, the sessionId will change, and there will be one more entry in the conversation list; multi-window v1 does not do coordination, so other windows must refresh themselves.
- If
rewritefails at thepromptstage, the README notes the source session will not be archived; you can manually resend in the new session. - The README “Unverified” section states: the full click-through chain after loading in a real host, session switching after saving, cleanup on uninstall while running, etc., need to be verified by yourself after restarting DSH on your machine.
Closing¶
dsh-message-edit brings “change one turn’s prompt, drop what follows, preserve the prefix cache, archive the old conversation” and “edit the final AI answer without resending” into three entry points in the Web UI, and explicitly aligns with the capability boundaries of DSH’s append-only logs. If you see a plugin with the same name on SkillHub or GitHub, the install command and behavior description in the repo README take precedence.
- Directory page: https://www.skillhub.cn/plugins/lxl8182/dsh-message-edit
- GitHub: https://github.com/lxl8182/dsh-message-edit