better-session
Verified@morlay/better-session · v0.1.8 · MIT
dsh profile bundle: assembles @morlay/session-branch, @morlay/session-rdb, @morlay/ui-conversation-message-actions, @morlay/ui-conversation-manager and @morlay/dsh-reference into a DeepSeek Harness web profile — the rewind / retry / recall / fork closed l
Install
dsh plugin add @morlay/better-session Confirm the layer applied with dsh --profile default --dump-config — see the install guide.
Source
Published to npm without a public repository. Inspect the package contents before installing.
Tags
Readme
@morlay/better-session
profile 聚合 bundle:一次性装配 @morlay/session-branch、@morlay/session-rdb、
@morlay/ui-conversation-message-actions、@morlay/ui-conversation-manager、@morlay/dsh-reference 到 DeepSeek
Harness 的 profile,提供就地编辑 / 重试 / 撤回 / 分支(rewind / retry / recall / fork)闭环。对话外壳走官方
ui-conversation 行,我们的扩展只注册在它的槽位上(conversation.chat.node / conversation.composer.dock)。
安装
dsh plugin --profile web add "@morlay/better-session"
安装带上全部子包,bundle patch(cordis.patch.yml)自动装配四层服务。装了什么、为什么这么
换、边界在哪,见设计 会话编辑闭环装配与
ADR 不 fork 上游前端组件。
使用
装配后即可在 GUI 会话中:
- 编辑 user 消息 → 撤回该消息及其后内容到输入框(rewind,不重放),用户改后自行发送(带确认弹窗)
- 重试 任意闭合回合 → 就地重放该回合输入(带确认弹窗)
- 分支(fork)→ 从任意闭合边界派生新会话
也可以直接调用服务:
// 编排层(host)
await ctx.sessionEditor.retry({ action: "retry", sessionId, turn: 2, cascade: "truncate" });
// 数据层
await ctx.sessionBranch.rewind(sessionId, 5);
await ctx.sessionBranch.forkFrom(sourceId, { atSeq: 6, childSessionId });
配置(rdb)
默认配置为 SQLite($DSH_HOME/sessions/sessions.sqlite)。改配置就是改 session-rdb 那一行的 config(bundle patch /
profile patch / 设置页都可)——字段、默认值与生效方式见
@morlay/session-rdb 的 README。