Repository navigation
DSH 会话从侧栏消失 / 变为「会话不可用」 #12940
Replies: 2 comments
|
这是真 bug:host 把「从内存卸载」当成「删除」发给客户端了。
ctx.on('session/disposed', (session) => { ctx.emit('api-session/removed', session.id) })客户端收到后,非 subagent 会话走
短期重启恢复是对的。如果想抓现场,趁会话消失但应用没重启时,把侧栏状态和对应 这段可以直接给 AI,让它对着 |
|
Independent reproduction + plugin-isolation data point (0.2.2-rc.1, Windows 11 desktop): Same symptoms as described — clicking/switching sessions in one workspace group makes rows vanish from the sidebar (click through the whole group and it empties); an app restart restores the list; session logs and workspace membership intact on disk. A/B isolation: removing all third-party bundles from the desktop profile (only the default bundle set) does not stop the repro — rows still disappear on click. So it is not plugin-interaction; it reproduces on the stock composition. Notably, the same stack (dsh CLI 0.2.2-rc.1 driving Workaround we use: restart the app (list rebuilds from disk, nothing lost). |
Uh oh!
There was an error while loading. Please reload this page.
环境
现象
session-xxxx…,输入框显示「会话不可用」,无法输入,也无法继续对话。复现步骤(最小)
session-…,输入框提示「会话不可用」。期望:卸载 A 不应让它从侧栏消失,也不应让已打开的 A 变成只读。
根因分析
DSH 不支持删除会话(只能归档),所以
session/disposed语义上只是从内存 store 卸载,并不代表删除。但宿主把它直接当成「会话被删除」转发给客户端:
@deepseek-ai/dsh-api-session-controller/lib/index.js:3828客户端收到
removed后:@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/manager.js:620而输入框的禁用条件里包含
removed:@deepseek-ai/dsh-client-ui-conversation/lib/client.js:21826客户端只有在连接重建 / 启动时才重新拉全量列表(
handleConnected()→refreshList()),因此行一旦被移除,会一直缺到下次重启。
数据证据
session.v4.jsonl.zstd的头部(id / cwd / createdAt / version)全部可正常解析。建议修复
session/disposed不要映射为api-session/removed。卸载应发「已卸载/离线」或什么都不发,交给下一次session.list覆盖。removed后回查列表;若该 id 仍在session.list中,应视为「未加载」,只清实例、不删行。removed也不应永久禁用输入,可退化为「重新打开」提示。补充
All reactions