deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
编辑已发送的用户消息并重新发送 —— 从该消息所在回合 fork 出一个新分支,用编辑后的文本重新生成回复。原会话自动归档,可在设置页一键恢复。
Edit a sent user message and resend it: fork a new branch from that message's turn and regenerate the reply with the edited text. The original session is archived automatically and can be restored from the Settings page.
A DeepSeek Harness (DSH) plugin for 0.1.0-rc.6 that adds edit-and-resend to any completed turn, built on the cordis plugin system and the Typert Remote protocol.
✎ 编辑本轮消息并重发 按钮(不替换官方 UI,纯增量注入)以
webprofile 为例,其他 profile 同理。要求 DSH ≥ 0.1.0-rc.6。 Example uses thewebprofile; others work the same. Requires DSH ≥ 0.1.0-rc.6.
# 1. 安装插件(发布包或本地路径均可)
# Install the plugin (published package or a local path both work)
dsh plugin --profile web add dsh-edit-resend
# 2. 把 cordis.patch.yml 中的 insert 行并入 profile 的 cordis.patch.yml
# Merge the insert line from cordis.patch.yml into the profile's cordis.patch.yml
# - id: edit-resend
# name: 'dsh-edit-resend'
# 3. 重启 dsh web(Host 端改动必须重启;之后客户端改动只需刷新页面)
# Restart dsh web (host-side changes require a restart; client-only changes
# are picked up by a page refresh, the bundle is served with no-cache)
将以下内容加入 profile 的 package.json 与 cordis.patch.yml:
// profiles/<name>/package.json
{
"dependencies": {
"dsh-edit-resend": "link:/absolute/path/to/dsh-edit-resend"
},
"bundles": {
"dsh-edit-resend": "dsh-edit-resend"
}
}
# profiles/<name>/cordis.patch.yml
- insert:
- id: edit-resend
name: 'dsh-edit-resend'
✎ 编辑本轮消息并重发✎ 编辑本轮消息并重发 on the turn tail.归档绝不删除数据:恢复后原会话回到原位置,日志完整保留。 Archiving never deletes data: a restored session returns to its original place with its full log intact.
| 层 | 机制 |
|---|---|
| Host 端 | EditResendService(cordis 服务,继承 TypertRemoteService)暴露 5 个 Remote 端点:edit / getText / archive / unarchive / listArchived。edit 从完整事件日志定位目标回合的 turn/start,切割出前缀作为 seed 调用 agents.create 创建子会话,attach 到原工作区,再以编辑后的文本触发 followup |
| Client 端 | UMD bundle 注入两个 slot:conversation.chat.turnTail(链式,编辑按钮)与 settings.section(归档恢复列表);通过 remote.editResend.* 调用 Host(第三方插件需自行 $mount Remote 贡献) |
| 归档竞态 | 归档广播会清空"当前被归档的会话",因此 client 先同步打开 fork、再归档原会话——归档到达时当前会话已是 fork,清空规则永不触发(详见 HANDOFF.md §3.5) |
| Layer | Mechanism |
|---|---|
| Host | EditResendService (a cordis service extending TypertRemoteService) exposes 5 Remote endpoints: edit / getText / archive / unarchive / listArchived. edit locates the target turn's turn/start in the full event log, seeds a child session with the retained prefix via agents.create, attaches it to the source workspace, and delivers the edited text as a followup |
| Client | A UMD bundle injects two slots: conversation.chat.turnTail (chain slot, edit button) and settings.section (archived-session restore list), calling the Host through remote.editResend.* (third-party plugins must $mount their own Remote contribution) |
| Archive race | The archive broadcast clears a current session that became archived, so the client opens the fork first and only then archives the source — by the time the broadcast lands, the current session is already the fork (details in HANDOFF.md §3.5) |
dsh-edit-resend/
├── lib/
│ ├── index.js # Host 半:EditResendService(5 个 Remote 端点) / Host half
│ ├── client.js # Client 半:UMD bundle(按钮 + 设置页) / Client half
│ ├── typert.host.js # Host Typert 清单(schema + invocation + model)
│ └── typert.remote.js # Client Remote 描述符 / descriptors
├── cordis.patch.yml # bundle patch 声明
├── package.json
└── HANDOFF.md # 开发记录与 root-cause 分析 / dev log & root-cause analyses
0.1.0-rc.6(web profile 验证)@deepseek-ai/cordis ^4.0.1、@deepseek-ai/dsh-agent ^0.1.0-rc.6、@deepseek-ai/dsh-typert-protocol ^0.1.0-rc.6workspaceRegistry.setState + host/archived-sessions-changed 广播)MIT — 请同时参考 DeepSeek Harness 的许可条款。 See also the DeepSeek Harness license terms.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。