(input: string | OpenWorkspaceInput)
| 70 | ) {} |
| 71 | |
| 72 | async openWorkspace(input: string | OpenWorkspaceInput): Promise<WorkspaceContext> { |
| 73 | const options = typeof input === "string" ? { path: input } : input; |
| 74 | const mode = options.mode ?? "checkout"; |
| 75 | |
| 76 | if (mode === "worktree") { |
| 77 | return this.openWorktreeWorkspace(options.path, options.baseRef); |
| 78 | } |
| 79 | |
| 80 | return this.openCheckoutWorkspace(options.path); |
| 81 | } |
| 82 | |
| 83 | getWorkspace(workspaceId: string): Workspace { |
| 84 | const workspace = this.workspaces.get(workspaceId); |
no test coverage detected