Skip to content

Releases

v0.1.0 — DSH 会话交接

Choose a tag to compare

@uu88s uu88s released this 26 Sep 18:18

首个版本。

功能

  • 复制会话 id:侧边栏会话行的 hover 图标 / … 菜单 / 会话头部按钮,一键拿到 DSH 会话 id。
  • 交接给 codex:把整个 DSH 会话转写成 codex 会话库里的原生记录(rollout 文件 + state_*.sqlite 的 threads 行),给出 codex resume <新 id>;两步式(先预演,确认才写),可撤销。

保真度

  • 用户 / 助手对话文本进两条通道:模型上下文(response_item)+ codex 界面转录(event_msg / TurnItem)。
  • 工具调用与输出进模型上下文(参数超 2 KB、输出超 8 KB 截断并标注)。
  • reasoning / 附件图片不转写。

安全性

  • 只增不改:flag: 'wx' 写 rollout,索引行只插入;同一源会话对应一个新目标会话。
  • 写入前预检 codex 家目录、state_*.sqlite、threads 表、必需列、schema 版本(已核实到 _sqlx_migrations = 57)。
  • 撤销 = 删新建的 rollout + 删刚插入的 threads 行(双条件匹配),文件被外部改过则拒绝(需 force)。
  • 每次交接 / 撤销都追加到 $DSH_HOME/session-handoff/handoffs.jsonl。

已实测

codex-cli 0.157.1:codex exec resume <新 id> --json 读进 306867 token 历史并正常回答;codex app-server 的 thread/turns/list 显示 8 轮 / 32 条可见条目。

安装

dsh plugin --profile web add github:uu88s/dsh-session-handoff#v0.1.0

或源码归档(含 test/ 与 docs/):

dsh plugin --profile web add https://codeload.github.com/uu88s/dsh-session-handoff/tar.gz/refs/tags/v0.1.0