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
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.
背景
我有一个会话最初在 workspace A(
E:\deepseek-h)里创建,但它的内容实际属于 workspace B(F:\3D\3D-agent)里的 3D 项目。我希望把这个会话"搬"到 B,这样在 B 的侧边栏里能看到并继续这段对话。目前做不到。现状(源码层面)
cwd字段决定(session.jsonl.zstd第一个 zstd frame)。workspace/attachSession严格校验 header 的cwd必须等于目标 workspace 路径(见dsh-workspace的entity.attachSession),因此无法"跨 workspace attach";workspace/insertSessionBefore只支持同一 workspace 内重排;assertStoredIdentity要求日志文件路径 ==logPath(root, header.cwd, id),所以光移动文件不改 header 会报"corrupt session log"。影响
workspace.json注册表 + message_feedback / session_projcache 等身份缓存),非常易错、且不可逆风险高。建议(按优先级)
workspace/moveSessionAPI:sessionId → targetWorkspaceId。由服务端统一负责:重写日志 header 的cwd/ 迁移会话目录 / 更新 workspace 注册表 / 失效相关身份缓存(message_feedback、session_projcache等),保证原子与幂等。session/fork支持指定目标 workspace(fork 出的会话cwd落到目标 workspace)。可行性已验证
我已手动走通一条迁移路径(停 daemon → 重写 header
cwd→ 移动会话目录 → 更新workspace.json与message_feedback→ 重启 daemon),迁移后会话内容、评分、历史均完整。这说明数据模型本身支持这种归属变更,只是缺少对应的 API / UI。环境
All reactions