Fix duplicate project worktree registration (#1024)
* Fix duplicate project worktree registration * Update archive redirect test for project-aware routes
This commit is contained in:
@@ -872,6 +872,7 @@ test("sends worktree base-ref fields in create_paseo_worktree_request", async ()
|
||||
const createPromise = client.createPaseoWorktree(
|
||||
{
|
||||
cwd: "/tmp/project",
|
||||
projectId: "remote:github.com/acme/project",
|
||||
worktreeSlug: "review-pr-123",
|
||||
refName: "feature/worktree-base-ref",
|
||||
action: "checkout",
|
||||
@@ -885,6 +886,7 @@ test("sends worktree base-ref fields in create_paseo_worktree_request", async ()
|
||||
expect(request).toEqual({
|
||||
type: "create_paseo_worktree_request",
|
||||
cwd: "/tmp/project",
|
||||
projectId: "remote:github.com/acme/project",
|
||||
worktreeSlug: "review-pr-123",
|
||||
refName: "feature/worktree-base-ref",
|
||||
action: "checkout",
|
||||
|
||||
@@ -259,7 +259,13 @@ export interface CreateAgentRequestOptions extends AgentConfigOverrides {
|
||||
|
||||
export interface CreatePaseoWorktreeInput extends Pick<
|
||||
CreatePaseoWorktreeRequest,
|
||||
"cwd" | "worktreeSlug" | "firstAgentContext" | "refName" | "action" | "githubPrNumber"
|
||||
| "cwd"
|
||||
| "projectId"
|
||||
| "worktreeSlug"
|
||||
| "firstAgentContext"
|
||||
| "refName"
|
||||
| "action"
|
||||
| "githubPrNumber"
|
||||
> {}
|
||||
|
||||
type CheckoutStatusPayload = CheckoutStatusResponse["payload"];
|
||||
@@ -3012,6 +3018,7 @@ export class DaemonClient {
|
||||
message: {
|
||||
type: "create_paseo_worktree_request",
|
||||
cwd: input.cwd,
|
||||
...(input.projectId !== undefined ? { projectId: input.projectId } : {}),
|
||||
worktreeSlug: input.worktreeSlug,
|
||||
...(input.firstAgentContext !== undefined
|
||||
? { firstAgentContext: input.firstAgentContext }
|
||||
|
||||
Reference in New Issue
Block a user