MCPcopy Create free account
hub / github.com/Waishnav/devspace / openWorkspace

Method openWorkspace

src/workspaces.ts:72–81  ·  view source on GitHub ↗
(input: string | OpenWorkspaceInput)

Source from the content-addressed store, hash-verified

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);

Callers 2

workspaces.test.tsFile · 0.80
createMcpServerFunction · 0.80

Calls 2

openWorktreeWorkspaceMethod · 0.95
openCheckoutWorkspaceMethod · 0.95

Tested by

no test coverage detected