v1.2.0 — auto-navigate after /fresh
·
5 commits
to master
since this release
Change
/fresh 现在会自动跳转到新会话(此前只归档、UI 停留在已归档的旧会话)。
根因:dsh 的「当前会话」是 client(前端)状态,host 命令无法导航(CommandResult 只保留 kind+text,sessionId 被丢弃)。
方案(双端插件):
- host(
lib/index.js):新会话meta.parentSession = 老会话id - client(
lib/client.js,新增):监听归档广播host/archived-sessions-changed→ 找到parentId === 归档会话的新会话 →ctx.sessions.open自动跳转;含时序兜底(新会话列表同步滞后归档帧时 pending 补跳)
package.json:exports['./client'] + dsh.client {platform: web, inject: [dsh-client-runtime]}
Verified
- smoke 18 断言 + client 6 断言 ALL PASS
- 本机部署:
/plugins/dsh-fresh-start/client.js返回 200,boot manifest 含 dsh-fresh-start