DSH Plugins Marketplace

DSH Plugins

Plugins

/

Development & Infrastructure

/

dsh-message-edit

T

dsh-message-edit

Manifest valid

Add an edit button to the message bubble, rewrite the model context via the DSH surface replace mechanism, with fork inheritance, markdown support, and auditability

UI (client)hasBundlePatch

dsh-message-edit

在消息气泡上提供「修改」按钮:编辑任意一条消息(用户消息 / 助手回复),通过 DSH 核心的 surface replace 机制真正改写模型可见上下文(append-only 日志保留审计),气泡文字同步显示新文本。

Add a "✏️ 修改" button to every message bubble: edit any message (user or assistant reply), rewrite the model-visible context through DSH's core surface-replace mechanism (append-only log keeps audit trail), and the bubble shows the new text in place.

awesome · DSH plugin

功能 / Features

  • 两种消息都可改:用户消息 + 助手回复的消息气泡上都有修改按钮
  • 正文直接替换:编辑后气泡里的文字直接变成新文本(不是额外卡片),格式化内容(粗体 / 表格 / 代码块 / 列表)以轻量 markdown 渲染保留
  • 上下文真正改写:通过 session.append(..., { surfaceOp: { op: "replace", ... } })——DSH 官方机制,模型后续看到的上下文是修改后的版本;append-only 日志保留原事件可审计
  • fork 继承:分支出新对话时,子会话自动继承已修改的上下文
  • 二次/多次修改:连续修改同一条消息也能正确工作(自动追踪 replace 链)
  • 线框风格图标:修改 / 复制按钮与官方 16px outline 图标风格一致

安装 / Install

dsh plugin --profile web add github:TwilightSpirit/dsh-message-edit

或手动将插件加入 ~/.dsh/profiles/web/ 的 package.json bundles 列表。

用法 / Usage

  1. 打开任意会话,在用户消息或助手回复的气泡上找到铅笔图标按钮
  2. 点击弹出编辑框,修改文本后点「保存修改」
  3. 气泡正文直接变成新文本;之后模型看到的上下文也是修改后的版本
  4. 已修改的消息按钮会变蓝(提示"已改"),可再次点击继续编辑

原理 / How it works

  • Host 侧:注册 /message-edit RPC 通道。replace 端点定位目标消息(按 messageId 或 seq),通过 session.append(type, data, { surfaceOp: { op: "replace", start, end }, sourceEventSeqs }) 追加替换事件,改写模型可见的 surface。
  • Client 侧:
    • 助手消息:注册官方插槽 conversation.chat.assistant-actions
    • 用户消息:覆盖 keyed user / steering 渲染器
    • 编辑后新文本存 localStorage 覆盖层(dsh-msg-edit:{sessionId}:{seq}),渲染时优先显示新文本(本地覆盖 + host query 兜底,fork 子会话也能查到)
  • fork 继承:监听 session/created,若子会话(header.parentSession 存在)的 seed 前缀内包含被替换消息,重放对应的 replace 事件;幂等检查避免重复。

说明:修改的是"模型看到的上下文",日志文件里旧内容仍在(DSH 的 append-only 安全设计,无法物理抹除),但模型视角和气泡显示都是新文本。

配置 / Config

无额外配置项。插件开箱即用。

依赖 / Dependencies

{
  "@deepseek-ai/dsh-session": "^0.1.0-rc.7"
}

client 端依赖(已在 dsh.client.inject 声明): @deepseek-ai/dsh-client-ui-conversation、@deepseek-ai/dsh-client-connection

License

MIT

Compatibility

DSH 0.1.7-rc.1: failedDSH 0.1.7-rc.2: failedDSH 0.2.0-rc.1: failed

Versions

Latest versionPublishedSize
0.2.1——
0.2.2——
0.2.3——

Comments

Loading…

Similar plugins

dsh-redo

by Imzl-zl

DSH 插件:编辑或重试已发送的消息并原地重新生成。Edit or retry sent messages and regenerate in place for DeepSeek Harness.

Sessions & MessagesManifest valid

★ 1

MIT

TypeScript

Oct 26, 2026

dsh plugin --profile web add dsh-redo

by SpookySandwich

DSH 消息编辑插件:编辑已发送的消息并从该处分叉对话,气泡下方带版本计数与树状视图。Edit a sent message and branch from that point — version counter, tree view, placement presets.

Sessions & MessagesManifest valid

★ 26

↓ 251/wk

NOASSERTION

JavaScript

Oct 26, 2026

dsh plugin --profile web add dsh-plugin-message-edit

by suzuran520yyz

DSH Web GUI 插件,用于对会话消息进行编辑、重试、高级重试和删除等功能的实现

Manifest valid

★ 0

MIT

JavaScript

Sep 3, 2026

dsh plugin --profile web add dsh-more-message-actions

by Moeblack

DSH 插件:分支式消息编辑、重掷、重试与版本时间线 | DSH plugin: branch-based message editing, reroll, retry, version timeline

Sessions & MessagesManifest valid

★ 53

↓ 633/wk

TypeScript

Aug 16, 2026

dsh plugin --profile web add dsh-message-edit

by zouxiaoyang

Codex 风格消息原地编辑 DSH 插件:hover ✎ 编辑 → 同会话截断并重新生成回复(surface replacement)

Development & InfrastructureManifest valid

★ 0

MIT

JavaScript

Sep 5, 2026

dsh plugin --profile web add dsh-message-rewrite

by lxl8182

DSH Web 用户消息编辑重发插件:改掉某一轮提问重发,该轮之后的内容丢弃,原会话归档(新会话继承逐字节相同前缀以保住 prompt 缓存)。

Manifest valid

★ 0

MIT

JavaScript

Sep 30, 2026

dsh plugin --profile web add dsh-message-edit