Introduction¶
The conversation log in DeepSeek Harness (DSH) is part of the workflow. When a user message or its corresponding AI response is no longer needed, you would typically consider deleting or archiving the entire session. However, DSH’s session management does not provide an entry point for “retracting a single message,” and many developers rely on conversation history for context retrieval or post-mortem analysis. Deleting the session outright means losing the history; continuing to delete within the current session requires rolling back through the filesystem or git, which is costly and risks inadvertently damaging saved work.
dsh-msg-retract addresses this specific problem: without touching disk files, forking the session, or rolling back saved work, it hides a user message and its associated AI response from the conversation, with the ability to restore them when needed.
Plugin Overview¶
- Plugin Name: dsh-msg-retract
- Maintainer: Luciferhhha
- Functionality: Retract any user message and its corresponding AI response in a DeepSeek Harness Web client conversation. It only hides that turn from the conversation flow and does not modify any files on disk or the session archive.
- Version: 1.2.1
Core Features¶
Retract a Message¶
Hover the mouse over any user message bubble. Two small buttons will appear in the bottom-right corner: Copy and Retract (↩).
Clicking ↩ only retracts the current message and the AI response in that same turn:
- The retracted message becomes a small gray dashed bar displaying
↩ Rettracted: <content preview> [Restore]. - The AI response for that turn is hidden from the conversation flow, so no visual gap or “missing block” appears.
- The message text is automatically filled back into the input box, ready for editing and resending.
- Retraction does not fork the session, archive it, or create a new sidebar entry. The conversation history is not lost, and you won’t be redirected to a blank page.
- If the response for that turn is still being generated, retracting will also stop the generation to avoid it continuing behind the hidden line.
Restore a Message¶
After retracting, a notification bar labeled ↩ Retacted Message appears above the input box:
- By default, it shows a one-line preview (truncated with
...if too long). Click the preview to expand the full content. - The
Restore Messagebutton on the right remains visible in all states. - Clicking
Restore Messageonly puts the current message and its response back into the conversation. Other retracted messages are unaffected. - After the notification bar disappears, you can still click
Restoreon the gray dashed bar in the conversation to recover it.
Message Counting Rules¶
The plugin only counts messages “sent by a real person.” System-injected runtime context and memory reminders are not included in the retraction scope.
Installation & Activation¶
Installation command:
dsh plugin add dsh-msg-retract
After installation:
- Go to Settings → Plugins, find dsh-msg-retract, and enable it.
- Restart DSH: The host-side half is parsed and loaded at startup, so simply refreshing the page is not sufficient.
If the plugin has not yet been published to an npm registry, do not use dsh plugin add directly, and do not manually drop the directory into node_modules. The package manager will move the directory to node_modules/.ignored during a subsequent pnpm install and display the warning: It is not in the dependency tree and pnpm has no record of installing it.. The correct approach is to declare it as a real dependency:
// <DSH profile directory>/package.json (e.g., ~/.dsh/profiles/desktop)
"dependencies": {
"dsh-msg-retract": "link:H:/DeepSeekHarnessDefult/dsh-msg-retract"
}
Then run the following in the same profile directory:
pnpm install
This way, pnpm-lock.yaml will record the link, and the entry will not be removed when you install other plugins later.
Environment Requirements¶
- DeepSeek Harness with the Web client.
@deepseek-ai/cordis>=4.0.0-rc <5(peer dependency).
Use Cases & Caveats¶
Suitable for the following scenarios:
- A user message in the conversation is poorly worded and needs to be retracted and resent, but you don’t want to delete the entire session.
- You need to hide an AI response from a particular turn while preserving the conversation context for continued reasoning or review.
- You prefer to make adjustments within the conversation flow rather than rolling back saved work through the filesystem or git.
Notes:
- The plugin runs with the permissions of the current DSH process. Review the source code and license before installing (this project is MIT-licensed).
- Retraction only hides the display in the conversation and does not modify any files on disk or the session archive.
Conclusion¶
dsh-msg-retract provides a low-cost “in-conversation retraction” capability, allowing you to adjust the conversation flow without touching any disk files. If you frequently debug or refine prompts in DSH, this plugin minimizes the cost of “removing a message.”
- Plugin Directory: https://www.skillhub.cn/plugins/Luciferhhha/dsh-msg-retract
- GitHub Repository: https://github.com/Luciferhhha/dsh-msg-retract