mbj733/dsh-edit-resend

Plugin插件 Native原生 ⭐ 4 MIT Sessions & Context会话与上下文

DeepSeek Harness (DSH) 插件:编辑已发送消息并重新发送(停止进行中的回复,编辑,重新发送),以及基于分支的编辑/重掷/重试和版本时间线。

Project Overview项目介绍

dsh-edit-resend is a plugin built exclusively for DeepSeek Harness (DSH) that lets users edit and resend messages in a conversation after they have been sent. It can be installed directly via the DSH CLI with the command dsh plugin --profile web add dsh-edit-resend, or installed for local development by linking a local cloned copy of the repository. Once installed, you just need to restart the running DSH web instance to activate the plugin, and it immediately adds a range of new conversation editing and management features to your DSH workflow.

When you notice an error in a sent message, or want to adjust your prompt to change the direction of the conversation, you can just click the edit icon on the target message to make your changes. When you hit resend, the plugin automatically stops any ongoing reply generation that is in progress, so you do not need to manually stop it first before editing. It supports editing user messages, assistant reasoning content, and assistant responses, plus it lets you regenerate the last reply or retry any past conversation turn from the timeline. It also displays clear error messages directly in the UI if something goes wrong, so you never get a silent failure.

This plugin improves on the upstream dsh-message-edit plugin by storing version metadata outside of your session logs, in a private JSON file at DSH_HOME/storages/dsh-edit-resend/versions.json. It never writes custom event types to your session logs, which means it will never trigger the SessionFormatUnsupportedError that can happen when you restart DSH after using the upstream plugin, so your sessions are always recoverable. It is released under the permissive MIT open source license, and has clear scope boundaries: it does not rewrite past session events, does not revert workspace file changes from external commands, and does not modify the DSH core engine or official UI packages. To build the plugin from source, you just need to run npm install then npm run build to generate the required output files.

这是一个专为 DeepSeek Harness (DSH) 开发的原生插件,核心功能是支持用户在消息发送后对其进行原位编辑并重新发送,还可以停止正在生成的回复、重新生成任意历史回合。支持单对话模式,修改后旧版本会自动归档,保留原标题,侧边栏始终仅显示一个对话。安装方式十分简便,可通过 DSH CLI 直接安装,也可本地开发后通过符号链接挂载,安装后重启 DSH 即可生效。

当你发现对话中的消息存在错误,或是想要调整提问方向、修正之前的输入时,可直接点击目标消息的编辑图标完成修改。点击重新发送后,插件会自动停止当前正在生成的回复,修改后不会产生重复消息,旧版本自动归档到插件内部存储。它适合经常需要调整对话内容、整理会话历史的 DSH 用户,也适合偏好简洁单对话管理模式的日常使用者。

和上游插件 dsh-message-edit 相比,本插件将版本元数据存储在会话日志之外的 DSH 私有存储中,不会往会话日志写入自定义事件,因此不会触发重启后的 SessionFormatUnsupportedError,会话始终可恢复。本插件采用 MIT 许可证开源,存在一定使用范围边界:不会原地改写历史会话事件,不恢复工作区文件或外部命令的副作用,也不修改 DSH 核心引擎与官方 UI。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-edit-resend

把 mbj733/dsh-edit-resend 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-edit-resend

DeepSeek Harness (DSH) 插件:在消息已发送之后原位编辑并重新发送——包括停止正在进行的回复、编辑、重新发送,以及重生成 / 重试任意回合。单对话模式:修改后旧版本自动归档、标题不变,侧边栏始终只保留一个对话。

与上游 dsh-message-edit 的关键区别:本插件的版本元数据存在会话日志之外(DSH_HOME/storages/dsh-edit-resend/versions.json),从不往会话日志写自定义事件类型,因此不会触发宿主重启后的 SessionFormatUnsupportedError,会话始终可恢复。

功能

  • 停止并编辑重发:回复进行中,标题栏出现「■ 停止」;你也可以直接点最后一条消息的「编辑」图标——修改后点「重新发送」时,插件会自动停止当前回复、等回复收敛后从该消息重新生成,无需先手动停止。不会产生重复消息,旧版本自动归档。
  • 失败可见:编辑框内与标题栏会直接显示失败原因(例如“所选消息不属于已落定回合”),不会再静默无反应。
  • 编辑已落定消息:编辑用户文本、助手思考(reasoning)与助手回复(response)。
  • 重生成:用原输入重新生成最后一条已落定回复。
  • 重试任意回合:在 Timeline 中选任意历史回合重跑。
  • 级联策略:truncate(默认,截断后续)/ preserve(保留后续用户输入依次重跑)。
  • 单对话模式:每次编辑 / 重生成 / 重试都会归档旧版本并沿用原标题,侧边栏只保留一个对话;「编辑与重发」标签页可查看当前版本与消息。

安装

dsh plugin --profile web add dsh-edit-resend
# 或本地开发(符号链接):
dsh plugin --profile web add -w link:/path/to/dsh-edit-resend

安装后重启 dsh(dsh web)即生效。

构建

npm install
npm run build

生成 index.mjs(Host 插件)与 client.js(Browser 插件)。

架构

  • Host 半(src/host.ts,注入 sessions/agents/sessionQuery/workspaceRegistry/webServer):通过 ctx.agents.create({ seed, meta }) 事务缝从目标回合之前分支;parentSession 落在会话头建立谱系,版本效果元数据落在插件私有 JSON 存储。
  • Client 半(src/client/*,注入 slots/conversation/connection/sessions):注册 conversation.view(「编辑与重发」标签页)与 conversation.session.header.actions(停止 / 重生成),并用 MutationObserver 把「编辑 / 重试」按钮注入到消息操作行。
  • HTTP 接口:GET /edit-resend?sessionId=(时间线投影)、POST /edit-resend(edit/reroll/retry)。

范围边界

  • 不原地改写会话事件;历史 append-only。
  • 不联动恢复工作区文件 / 外部命令副作用。
  • 不修改 DSH 引擎或官方 UI 包。
← 上一个 Prev dsh-self-control-guard 下一个 Next dsh-log-memory →