DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Rewind — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
R

@xsj/dsh-rewind

Rewind

Rewind a DSH conversation to any user message: hide the tail from the chat view and the model context, keep the durable log intact, cancel freely before sending.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:XSJUSTC/dsh-rewind#228d658d1d114a8c8227398deee0d8af584abee1
READMECompatibilityVersions

Compatibility and provenance

Rewind is published as @xsj/dsh-rewind and currently resolves to version 2.3.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
9/20/2026

Versions

2.3.0stable
9/20/2026
2.2.0stable
9/16/2026
2.1.2stable
9/7/2026

Related plugins

Loading related plugins…

Latest
2.3.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 6
Weekly downloads
0
Last push
9/20/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in memory-context.

Memory Plugin@openviking/dsh-memory-pluginOpenViking memory and context bundle for DeepSeek HarnessContextdsh-contextA DeepSeek Harness plugin for context insight and management, with context dashboard and context command, for understanding how the context is made of, and how it evolves.Weknora@wxg-prc-cpg/dsh-weknoraWeKnora knowledge retrieval tools for DeepSeek Harness (dsh): semantic search, document reading and RAG/agent answers over your own knowledge bases.Memsearch Dsh@zilliz/memsearch-dshMemSearch plugin for DeepSeek Harness: shared markdown memory across agents, with capture, pre-step context injection, memory-recall skill, and a skill-candidate review panel.

README

@xsj/dsh-rewind

English | 简体中文

DSH(DeepSeek Harness)会话回退插件。永久 bundle 插件:宿主机半 + Web 客户端半,零依赖、零构建步骤。

功能

  • 每条用户消息的操作行(复制图标旁)出现 ↺ 回退 图标。点击后:
    • 若模型正在思考/输出,立即打断当前回合;
    • 该消息及其后的所有内容在聊天视图中隐藏(如同从未发生);
    • 该消息文本自动填入输入框,未发送、可编辑;
    • 该消息携带的图片也会重新挂回输入框(从会话日志读回原始字节,走官方附件入档流程,自动套用图片数量/大小限制);
    • 下一次发送时,模型只看到截断后的历史(回退点之前)+ 新消息。
  • 回退待发送期间:
    • 输入框上方出现提示横幅;
    • 发送按钮左侧出现 ✕「取消回溯」:点击后恢复被隐藏的消息,草稿保持不变,不发送任何内容。
  • 发送后(回退生效):被隐藏的消息永远不再出现在聊天视图,也不再进入模型上下文。
  • 仅用户消息可回退;DSH(助手)消息没有回退入口(Host 侧强制校验事件类型)。

版本兼容性

  • v2.2.0 实测支持 dsh 0.1.5-rc.2,并保留对 0.1.x 早期版本的兼容——事件流读取优先官方 snapshotEvents() / eventAt(),旧宿主自动回退 session.events。
  • v2.3.0 变更:
    • 回退时同步回填图片:Host 半新增 /api/xsj-rewind/image 端点,依 attachmentId 从会话日志读回原始字节;客户端构造成 File 后通过 composer 的隐藏文件输入重新入档,自动触发官方的图片数量/大小校验。
    • Host 半新增 attachments 服务注入(读回图片字节用)。
  • v2.2.0 变更:
    • 适配 0.1.5-rc.2:primitives.MessageText 已被移除,用户气泡文本改用与官方相同的 projectUserText() 渲染(自动获得 @引用/会话 chip 高亮);
    • 客户端 inject 声明更新:移除已废弃的 @deepseek-ai/dsh-client-runtime,补上 @deepseek-ai/dsh-client-ui-attachment(ImageGallery 所在模块行);
    • 清理冗余与调试残留代码(调试日志、无效的 fuzzy 会话解析、两处死代码)。
  • 旧版(≤2.1.2)在 dsh 0.1.5-rc.2 上的已知症状:用户消息行渲染崩溃、回退按钮不出现——请升级到 ≥2.2.0。

日志与可恢复性

  • 会话日志(append-only 事件流)从不删除任何原始消息。
  • 每次状态变化追加一条 hook/invoked 事件,负载为 { source: 'xsj.rewind', phase: 'mark' | 'cancel' | 'commit', targetSeq, hiddenFrom?, hiddenTo?, preview? }。 该事件类型属于本构建的已知保留词条(无读写方),重载安全。
  • 进程重启后打开会话,Host 半会回放这些记录重建隐藏区间:模型侧与 UI 侧的隐藏状态跨重启保持一致。
  • 「轨迹」视图不渲染该保留事件类型;审计请直接查看会话 JSONL 日志。

安装

# 在任意目录执行(路径指向本仓库克隆位置):
dsh plugin --profile web add <本仓库目录的绝对路径>

# 重启 DSH 进程,并刷新浏览器页面

该命令会把包登记进 profile(~/.dsh/profiles/<name>/package.json 的 dependencies + dsh.profile.bundles),profile 启动时合并本包的 cordis.patch.yml 插入宿主机插件行,Web 客户端扫描自动加载 lib/client.js。

卸载

dsh plugin --profile web remove @xsj/dsh-rewind
# 重启 DSH。会话日志中的 rewind 记录无害保留(hook/invoked 为已知类型)。

实现要点

  • 模型侧截断:按需修补 live Session 对象的 deriveMessages(),按已提交区间过滤 surface 节点(带签名缓存)。请求构建、llm/stream 重放不变量、图片检查全部走同一入口,天然一致。 日志不增删改任何消息事件。
  • 打断:mark 时若代理正在运行,agent.cancel({ kind: 'user' }, { keepInbox: true }) 中断当前回合;排队消息保留,随后从截断点继续。
  • 生效点:agent/pre-step 瀑布中,待回退会话一旦有新输入消息进入步骤即提交隐藏区间 [targetSeq, 当前日志末尾];新消息在此之后追加,不受影响。
  • UI 隐藏:纯 DOM 实现——聊天行包裹元素带 data-chat-flow-key,客户端按行打 seq 戳 并由 MutationObserver 驱动,对隐藏行内联 display:none;不依赖宿主 store 内部形状, 取消/切换会话即还原,不改动任何既有渲染器。
  • 回退图标:以优先级 -1 接管 conversation.chat.node 的 user/steering 渲染器(槽位系统的原生遮蔽机制),行内复刻原生气泡(projectUserText / ImageGallery / Tooltip / writeClipboard),追加 ↺ 按钮。

移植

本插件无任何 npm 依赖:Host 半只用 Node 内置模块与注入服务,Client 半经 window.__ModuleLoader__ 从外壳的冻结模块表取 react / @deepseek-ai/dsh-client-ui-primitives / @deepseek-ai/dsh-client-ui-attachment。 克隆本仓库到任意机器后按「安装」一节操作即可。

License

MIT