Fix duplicate project worktree registration (#1024)

* Fix duplicate project worktree registration

* Update archive redirect test for project-aware routes
This commit is contained in:
Mohamed Boudra
2026-05-14 20:57:32 +08:00
committed by GitHub
parent 7e255a5249
commit fbeda4510e
16 changed files with 415 additions and 43 deletions
+4 -1
View File
@@ -358,7 +358,7 @@ export function buildHostOpenProjectRoute(serverId: string) {
export function buildHostNewWorkspaceRoute(
serverId: string,
sourceDirectory: string,
options?: { displayName?: string },
options?: { displayName?: string; projectId?: string },
) {
const base = buildHostRootRoute(serverId);
if (base === "/") {
@@ -369,6 +369,9 @@ export function buildHostNewWorkspaceRoute(
if (options?.displayName) {
params.set("name", options.displayName);
}
if (options?.projectId) {
params.set("projectId", options.projectId);
}
return `${base}/new?${params.toString()}` as const;
}