dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Codex 风格消息原地编辑 DSH 插件:hover ✎ 编辑 → 同会话截断并重新生成回复(surface replacement)
DeepSeek Harness(DSH)消息原地编辑插件 —— Codex 风格:hover 历史用户消息 → ✎ 编辑 → 同会话从编辑点截断旧回复并重新生成。
适用于 DeepSeek Harness 桌面 App / Web(DSH profile 插件体系,Cordis bundle 双半包:host index.js + client client.js)。
surfaceOp: replace),同一会话从编辑点重新生成——不开新会话。index.js、client.js、cordis.patch.yml 放到你的 DSH profile 插件目录,例如:
# 桌面 App profile 通常为 ~/.dsh/profiles/web
PLUGIN_DIR=~/.dsh/profiles/web/plugins/dsh-message-rewrite
mkdir -p "$PLUGIN_DIR"
cp index.js client.js cordis.patch.yml package.json "$PLUGIN_DIR/"
~/.dsh/profiles/web/package.json 的 dependencies 加入:
"dsh-message-rewrite": "file:./plugins/dsh-message-rewrite"
在 dsh.profile.bundles 数组加入:"dsh-message-rewrite"~/bin/dsh-server-restart),刷新页面。cd ~/.dsh/profiles/web
pnpm add dsh-message-rewrite
# 并把 "dsh-message-rewrite" 加入 package.json 的 dsh.profile.bundles
bash ~/bin/dsh-server-restart # 重启后刷新页面
⚠️
cordis.patch.yml通过 bundle 通道自动加载;请勿再在主cordis.patch.yml重复 insert 本插件,否则 webserver 会因duplicate prefix route /dsh-rewrite启动崩溃。
Agent 运行中提交会提示「请先等待本轮结束」(不静默吞点击)。编辑中间消息会自动 fork 到新会话。
index.js,CJS,inject connection + agents)
/dsh-rewrite/list:列出会话 surface 上可编辑的用户消息(seq + 文本 + id + rewrite 元数据)。/dsh-rewrite/rewrite:校验 agent idle → 构造带 source.rewrite 的新 user message → agent.followup() 入 inbox 唤醒 driver → 在 agent/pre-step(prepend)拦截该消息的 append,包成 surfaceOp:{op:"replace", start, end} + sourceEventSeqs,旧尾部从表面移除(审计日志保留)。client.js):__ModuleLoader__ 加载的 web 客户端;扫描官方消息列表(data-chat-flow-kind="user" + data-chat-anchor-key),用 uuid 与 host list 精确对齐挂 ✎ 按钮;自绘「✎ 已编辑」气泡(双锚点定位,兼容虚拟滚动);被 replace shadow 的旧行打 data-message-rewrite-discarded 隐藏。ctx.on("agent/pre-step", ({agent, messages, signal}, next), {prepend:true})agent.session.append(type, data, {surfaceOp:{op:"replace",start,end}, sourceEventSeqs})agent.followup(msg) = inbox "next-turn" 插入 + wakeDriveragent.status(idle/running)、agent.session.surface.nodes、agent.session.eventscreateUserMessage from @deepseek-ai/dsh-llm(ESM,host 动态 import)~/.dsh/profiles/web/package.json 移除依赖与 dsh.profile.bundles 条目。plugins/dsh-message-rewrite 目录(如已软链进 node_modules 一并删除)。__ModuleLoader__),非独立 CLI。MIT