Repository navigation
Replies: 4 comments
|
Thanks for a very concrete report — and you are right, and it is a regression: the plain New Session entry stopped reusing the blank Session in 1. A draft is stored per Session id, not per conversationThe draft is not thrown away — it is keyed to a Session id:
So everything hangs on one question: does the same Session id come back? The stored text is never discarded; it is left under an id that nothing points at any more. 2. Why the row leaves the sidebarThat part is deliberate. if (session.blank && session.id !== current) return false
3. Why "New Session" does not come back to it — the actual defectEvery plain New Session entry point calls
if (reuse === undefined) return this.sessions.create({ workspaceId })The blank-reusing branch is the other one — const blank = sessions.ids.find((id) => {
const summary = sessions.byId[id]
return summary !== undefined && summary.blank && summary.cwd === workspace.path
&& workspace.sessionIds.includes(id) && !archived.includes(id)
})It is reached only when The reuse machinery itself still works — you can see it from the other side. The picker that starts a Session in a chosen Workspace passes options: 4. Where the regression came fromOne commit carries it: Before that commit, By release: I checked every line above on both your build ( 5. Recovering the text you have already lostIt is still in your browser storage. In the desktop app (or the web UI) open DevTools and list the conversation keys: Object.keys(localStorage).filter(k => k.startsWith('dsh.conversation.'))
.map(k => [k, localStorage.getItem(k)])Each value is JSON of Two limits worth knowing. Inline reference chips survive as well (they are carried in 6. Where the fix belongsTwo small client-side changes, either of which closes it, and neither one touches the "an empty blank row is provisional" rule:
(1) is the smaller change and matches your expectation exactly; it also makes the ⌘N path agree with the Workspace-picker path, which today behaves differently for no stated reason. One note in case a client-side rescue is preferred over the core change: the write face is public — |
Correction to my earlier replyI called this a regression. The mechanism and the recovery steps above stand, but the framing was wrong, and one of the two fixes I proposed is the wrong fix. The option-less New Session path did not lose an argument — it was changed on purpose, and the change shipped with an upgrade guide in the same commit:
The commit is What that invalidates: my suggestion 1 — "let the option-less New Session reuse an eligible blank when that blank still holds a stored draft" — gets the draft back by re-opening the path the change exists to close. On the Host, a preset-less create reuses a blank that is already live under the same preset id without re-mounting it ( What survives: the defect is that the change also moved which storage key an unsent draft lives under, with no migration and no signal ( The better fix, and the accurate version of this analysis, is in a later report of the same defect: #10021 — create the fresh Session, then hand the orphaned draft over to its new id before the shell mounts. |
Update: a patch keeps the draft while keeping fresh New SessionsThe request here — keep an unsent draft when the user leaves a new chat — now has an implemented fix without restoring the An option-less New Session still opens a fresh Session; before that Session's selection publishes, The fix and its evidence are on the draft-regression thread: #10021. |
|
补充一个上面的评论没有覆盖到的点:不只是把文字从 localStorage 里读出来,还可以把那个被遗弃的会话重新打开,让草稿回到输入框。
已在 |
Uh oh!
There was an error while loading. Please reload this page.
在当前的0.2.1alpha4版本中,在任意工作区中新建对话,输入一部分消息,在未发送的情况下,切换到其他会话,新会话条目从左边栏消失,再次点击新会话后,之前未发送的输入了一部分的草稿消息丢失了。
我们有可能会有以下工作场景,新建会话,输入了一部分消息,需要到其他会话中看一下其他会话中的消息(可能是agent输出的一些结论或者某些文件路径,或者某些看一遍记不住的重要信息),于是我们切换到其他会话,再次切换回新会话,继续输入消息。
由于新会话无法保留草稿,以上的工作流程会被打断,不得不在一个其他的地方输入消息(比如其他编辑器输入消息),在各个会话中来回切换后,在其他地方完成输入消息后,再把消息复制到新会话中进行发送。
在以前的版本中,我记得新会话是被保留的,就算中途切换到其他会话,再次切换回来,之前没发送的消息是仍然存在的。
All reactions