You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constmatch='把上面某个 id 的前 8 位粘这里'constcur=JSON.parse(localStorage.getItem('dsh.sessions.current')).sessionIdconstsrc=Object.keys(localStorage).find(k=>k.startsWith('dsh.conversation.')&&k.includes(match))consttext=(JSON.parse(localStorage.getItem(src))||{}).draft||''localStorage.setItem('dsh.conversation.'+cur,JSON.stringify({draft: text,view: null,viewRequest: null}))location.reload()
English summary
Bug: In 0.1.7, a new session is a blank placeholder. When that blank session is writer-held by another connection (session/writer-held), reuseBlank() silently falls back to sessions.create({ workspaceId }), i.e. a new session id. Unsent composer drafts are persisted per session id (localStorage["dsh.conversation.<id>"], restored only when the very same id is reopened), and the sidebar deliberately hides every blank session except the current one — so the previous blank session and its draft become unreachable with no notice. Worked before 0.1.7 because there was no blank-session layer.
Repro: keep two connections to the same workspace (two tabs — dsh web opens one automatically — or two instances), create a new session in one, type without sending, then hit “New session” again: the id changes and the draft is orphaned in localStorage.
Expected: migrate the draft (and draft attachments) in the session/writer-held fallback, like the existing openWorkspace(…).beforeOpen migration does; or at least surface the draft / keep the abandoned blank session reachable.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
[Bug] 空白新会话遇到 writer-held 时会静默换新会话,未发送的草稿随之“消失”
Summary
0.1.7 起「新建会话」用一个空白(blank)占位会话承载首条输入。当这个空白会话被另一个连接持有写者时(RPC
session/writer-held),客户端会静默新建一个不同 id 的空白会话。而草稿是按会话 id 持久化的(
localStorage["dsh.conversation.<sessionId>"]),同时侧边栏规则是「空白会话只显示当前选中的那一个」。两者叠加的结果:在旧空白会话里已输入但未发送的草稿会变得不可达(数据其实仍在 localStorage 里,但 UI 没有入口回到那个会话),用户感知就是“内容没了”,没有任何提示。升级到 0.1.7 之前(没有空白会话这一层)不会出现。Reproduction
dsh web实例 —— 注意dsh web启动时会自动打开一个标签页,所以很容易出现两个)。localStorage["dsh.conversation.session-<旧 id>"],但侧边栏里再也找不到那个空白会话。实测记录(同一台机器、同一 profile):
1acb5dc1…变成3d26c5b7…;localStorage["dsh.conversation.session-1acb5dc1…"]里的草稿仍在,但无法回到该会话 ❌Current behavior
Expected behavior
任选其一即可,建议 1+2:
reuseBlank()的session/writer-held回退分支在创建新空白会话时,把旧会话的草稿(及草稿附件)迁移到新会话 —— 与切工作区/切会话路径保持一致;代码定位(0.1.7-alpha.2 安装包)
@deepseek-ai/dsh-client-ui-workspace/lib/client.jsreuseOrCreateBlank()(约 842 行)→reuseBlank()(约 852 行):if (session.blank && session.id !== current) return false—— 非当前空白会话不进入列表。@deepseek-ai/dsh-client-ui-conversation/lib/client.jscreateConversationStore(),persist: "dsh.conversation"(约 3151–3175 行),按会话 id 落到localStorage["dsh.conversation.<sessionId>"](约 3188–3190 行)。DefaultConversationViews的 effectif (inputState.draft === "" && storedDraft !== "") inputActions.setDraft(storedDraft)(约 16244 行)—— 只对同一个 session id 生效。openWorkspace(…)的beforeOpen(约 17814–17822 行)在切换会话/工作区时把snapshot.draft与附件搬到下一个会话的 shell。缺的正是空白会话回退这一条路径。Environment
0.1.7-alpha.2(0.1.7-alpha.1 同一代码路径,同样可复现)dsh web(web profile),ChromiumlocalStorage直接取证Workaround(给其他遇到的人)
在 dsh 页面 Console 里列出所有非空草稿(含孤儿的):
把某条草稿搬回当前会话(然后刷新页面即可回填):
English summary
Bug: In 0.1.7, a new session is a blank placeholder. When that blank session is writer-held by another connection (
session/writer-held),reuseBlank()silently falls back tosessions.create({ workspaceId }), i.e. a new session id. Unsent composer drafts are persisted per session id (localStorage["dsh.conversation.<id>"], restored only when the very same id is reopened), and the sidebar deliberately hides every blank session except the current one — so the previous blank session and its draft become unreachable with no notice. Worked before 0.1.7 because there was no blank-session layer.Repro: keep two connections to the same workspace (two tabs —
dsh webopens one automatically — or two instances), create a new session in one, type without sending, then hit “New session” again: the id changes and the draft is orphaned in localStorage.Expected: migrate the draft (and draft attachments) in the
session/writer-heldfallback, like the existingopenWorkspace(…).beforeOpenmigration does; or at least surface the draft / keep the abandoned blank session reachable.All reactions