Replies: 1 comment
|
补充证据(同一根因在
修复建议与正文一致:服务端 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Windows: a whole drive (e.g.
D:\) cannot be used as a Workspace — blank title andsession.createfails with EPERMSummary
On Windows, picking a drive root (e.g.
D:\) as a Workspace produces two failures:startSessionlogsnew session failed:to the console and nothing happens in the UI.Both are caused by special-casing of Windows volume roots that the current code does not handle.
Environment
@deepseek-ai/dsh-workspace0.1.0-rc.6,@deepseek-ai/dsh-host-apiproxy0.1.0-rc.6D:\in the directory picker as the Workspace, then click the "+" (New Session) button on that Workspace.Steps to reproduce
D:\) as the Workspace directory.new session failed: ....Expected behavior
D:\).Actual behavior
titleis stored as""and rendered verbatim → blank Workspace name.startSessionswallows the error withconsole.warn.Root cause
1. Blank title —
path.basenamereturns""for a Windows drive rootnode:pathon Windows:The Workspace registry derives the display title from the basename:
packages/workspace/workspace—createCanonical:const workspaceName = title ?? basename(canonical);packages/workspace/workspace— historybootstrap:title: basename(group.path),For a drive root both produce
"", which is stored in the durable record and shown verbatim by the sidebar (the client'sworkspaceLabel(cwd)fallback exists only for ungrouped/search rows, not for the Workspace header).2.
session.createfails —fs.mkdir(cwd, { recursive: true })throws EPERM on a volume rootIn
packages/host/apiproxy—ensureSession:On Windows,
fs.promises.mkdir("D:\\", { recursive: true })rejects withEPERM: operation not permitted, mkdir 'D:\'even though the directory already exists: for a volume root,CreateDirectoryWreturnsERROR_ACCESS_DENIEDrather thanERROR_ALREADY_EXISTS, and Node only swallowsEEXISTin recursive mode. The RPC then returnscode: "internal", the client'sstartSessioncatches it and only logs to the console, so the UI appears to do nothing.Verified with Node 22 on Windows:
Suggested fix
(
statis already imported in that module.)A ready-to-apply patch against the published
0.1.0-rc.6bundles is attached asfix-bundles-0.1.0-rc.6.patch; the corresponding TypeScript sources are the two locations above.Notes
mkdir("/", { recursive: true })succeeds (EEXIST is swallowed) and/has a non-empty basename.workspaceLabelreuse as well.All reactions