fix(workspace): keep the default Workspace path language-neutral
The first-use directory name and its stored title came from the Client's startup language, so one product decision carried two incompatible requirements: a path addressed by shell commands, tool arguments, @path references, and session logs, and a label a reader reads. The controller now owns the fixed `default-workspace` directory name and the registry titles the Workspace after that same segment, so `workspace.initializeDefault` takes no request at all — WorkspaceInitializeDefaultRequest and its name validation are gone, and the registry resolver returns a path instead of a path and title. No language reaches the Host. Browser consumers label a Workspace through the new `workspaceDisplayTitle`: a title still equal to the automatic one reads as the localized default name from the `common` namespace, every other title reads verbatim. The Workspace browser resolves it once at the store read, so rows, hover card, search meta, and the rename and delete dialogs inherit it; the hero picker and the Conversation chip resolve it too. Confirming a rename stores the text on screen, which is what stops a row following the language.
This commit is contained in:
1 parent
5e25475857
commit
ff1c7d415f
53 files changed
+297
-195
No files matched your search
@@ -3,6 +3,7 @@
|
||||
import { homedir } from 'node:os'
|
||||
import { posix, win32 } from 'node:path'
|
||||
import { runNativeCommand, type NativeCommandRunner } from '@deepseek-ai/dsh-native-command'
|
||||
import { DEFAULT_WORKSPACE_DIRECTORY } from './default-workspace.ts'
|
||||
|
||||
/** Platform observations replaceable in directory-resolution tests. */
|
||||
interface DocumentsDirectoryInternals {
|
||||
@@ -28,14 +29,12 @@ export function validateDocumentsDirectory(directory: string, platform: NodeJS.P
|
||||
|
||||
/**
|
||||
* Resolve the first-use directory on the Host without creating files.
|
||||
* @param directoryName - validated single directory name supplied by the Client.
|
||||
* @param documentsDirectory - explicit deployment override for the system Documents directory.
|
||||
* @param signal - caller lifetime and lookup deadline.
|
||||
* @param internals - platform facts and native command runner.
|
||||
* @returns the absolute candidate path.
|
||||
*/
|
||||
export async function defaultWorkspaceDirectory(
|
||||
directoryName: string,
|
||||
documentsDirectory: string | undefined,
|
||||
signal: AbortSignal,
|
||||
internals: DocumentsDirectoryInternals = {},
|
||||
@@ -75,5 +74,5 @@ export async function defaultWorkspaceDirectory(
|
||||
}
|
||||
directory = validateDocumentsDirectory(directory, platform)
|
||||
signal.throwIfAborted()
|
||||
return paths.join(directory, 'deepseek-harness', directoryName)
|
||||
return paths.join(directory, 'deepseek-harness', DEFAULT_WORKSPACE_DIRECTORY)
|
||||
}
|
||||
Reference in new issue
Block a user