メインコンテンツへスキップ
L

dsh-msg-retract

luciferhhha/dsh-msg-retract

Retracts a user message together with the reply it produced: the turn collapses to a stub in the transcript, an answer still being generated is stopped exactly as the stop button would stop it, and a retracted message can be restored afterwards. Steering messages passed to a running answer can be collapsed the same way without interrupting it.

インストール

dsh plugin --profile web add github:luciferhhha/dsh-msg-retract

README

dsh-msg-retract

English | 中文

Retract any user message (and the AI reply of its turn) from a DeepSeek Harness conversation — without touching anything on disk.

It only hides a turn in the transcript. No fork, no session archive, no file rollback, no git. Your real work on disk is never modified.


English

What it does

Hover any user message: two small buttons appear at the bottom-right of the bubble — copy, and retract (↩).

  • Click ↩ → retracts only that message and the AI reply of its turn. Earlier and later conversation stays exactly as it was.
    • The retracted message becomes a gray dashed placeholder: ↩ retracted: <preview> [restore]. The turn's reply is hidden from the view, so the conversation never shows an empty gap.
    • The message text is put back into the composer so you can edit and re-send it.
    • Retracting does not fork, archive, or create a new session — no extra sidebar entry, no history loss, no blank screen.
    • If the turn is still generating, retracting stops that turn so it doesn't keep running behind the hidden row.
  • A one-shot banner ↩ message retracted appears above the composer: a single-line preview (ellipsis when long), click to expand the full content, and a restore button that is always visible. The banner width auto-aligns to the composer below.
  • Click restore → puts back only that message and its reply. Other retracted messages are unaffected. After the banner disappears, you can still restore from the gray placeholder in the transcript.

Only real user messages count. Runtime context injections and memory reminders are ignored — they are not things you said.

Install

dsh plugin add dsh-msg-retract

Then enable it in Settings → Plugins. The plugin ships a dsh.bundle manifest, so it installs like any other DSH bundle.

Restart DSH afterwards. The host half is resolved while the app boots, so reloading the page is not enough.

If the package is not on your npm registry yet, install it from a local checkout instead of dsh plugin add — dropping a folder into node_modules by hand is not enough, the plugin manager's next pnpm install moves it to node_modules/.ignored with It is not in the dependency tree and pnpm has no record of installing it. Declare it as a real dependency instead:

// <DSH profile>/package.json  (e.g. ~/.dsh/profiles/desktop)
"dependencies": {
  "dsh-msg-retract": "link:H:/DeepSeekHarnessDefult/dsh-msg-retract"
}
# in the same profile directory
pnpm install

pnpm-lock.yaml then records the link, so the entry survives later plugin installs.

Requirements

  • DeepSeek Harness with the web client.
  • @deepseek-ai/cordis >=4.0.0-rc <5 (declared as a peer dependency).

License

MIT


中文

只撤回对话消息(用户消息 + 它所在轮次的 AI 回答),不触碰磁盘上的任何文件改动、不回退已完成的工作量。

它只是在对话里隐藏一个轮次:不 fork、不归档会话、不回退文件、不动 git。你磁盘上的真实工作永远不会被修改。

用法

鼠标移到任意用户消息上 → 气泡右下角出现两个小按钮:复制、撤回(↩)。

  • 点 ↩ → 只撤回这一条消息和它所在轮次的 AI 回答;更早、更晚的对话原样留着。
    • 被撤回的消息变成一个灰色虚线小条:↩ 已撤回:<内容预览> [恢复],轮次的回答从对话里隐藏,所以对话不会出现"凭空少一块"的空洞。
    • 消息文本会同时填回输入框,可以直接改一改再发。
    • 撤回不 fork、不归档、不新建会话:侧栏不会多条记录,历史不会消失,也不会跳到空白对话。
    • 如果这一轮还在生成回答,撤回会顺手把这一轮停掉。
  • 输入框上方出现一次提示条 ↩ 已撤回消息:默认一行预览(超出用 ...),点预览可展开完整内容,右侧的 恢复消息 任何状态下都可见;横幅宽度自动对齐下方的输入框。
  • 点 恢复消息 → 只把那一条消息和它的回答放回对话,其它已撤回的消息不受影响。提示条消失后,仍可在对话里那条灰色小条上点 恢复 取回。

只统计"真人发的"消息:运行时上下文注入和记忆提醒都不计入。

安装

dsh plugin add dsh-msg-retract

然后在 设置 → 插件 里启用。插件自带 dsh.bundle 清单,可像其它 DSH bundle 一样安装。

装完必须重启 DSH:宿主端那一半在启动时解析加载,只刷新页面不够。

如果这个包还没发到你的 npm 源,不要用 dsh plugin add,也不要手工往 node_modules 里拷目录 —— 插件管理器下一次 pnpm install 会把它挪进 node_modules/.ignored,日志原文是 It is not in the dependency tree and pnpm has no record of installing it.。正确做法是把它声明成真正的依赖:

// <DSH profile 目录>/package.json(如 ~/.dsh/profiles/desktop)
"dependencies": {
  "dsh-msg-retract": "link:H:/DeepSeekHarnessDefult/dsh-msg-retract"
}
# 在同一个 profile 目录里
pnpm install

这样 pnpm-lock.yaml 会记下这个 link,之后装别的插件也不会再把它清掉。

环境要求

  • 带 Web 客户端的 DeepSeek Harness。
  • @deepseek-ai/cordis >=4.0.0-rc <5(peer 依赖)。

许可证

MIT

関連プラグイン