MCPcopy
hub / github.com/coder/mux / createWorkspace

Method createWorkspace

src/node/runtime/LocalRuntime.ts:61–86  ·  view source on GitHub ↗

* Creating a workspace is a no-op for LocalRuntime since we use the project directory directly. * We just verify the directory exists.

(params: WorkspaceCreationParams)

Source from the content-addressed store, hash-verified

59 * We just verify the directory exists.
60 */
61 async createWorkspace(params: WorkspaceCreationParams): Promise<WorkspaceCreationResult> {
62 const { initLogger } = params;
63
64 try {
65 initLogger.logStep("Using project directory directly (no worktree isolation)");
66
67 // Verify the project directory exists
68 try {
69 await this.stat(this.projectPath);
70 } catch {
71 return {
72 success: false,
73 error: `Project directory does not exist: ${this.projectPath}`,
74 };
75 }
76
77 initLogger.logStep("Project directory verified");
78
79 return { success: true, workspacePath: this.projectPath };
80 } catch (error) {
81 return {
82 success: false,
83 error: getErrorMessage(error),
84 };
85 }
86 }
87
88 async initWorkspace(params: WorkspaceInitParams): Promise<WorkspaceInitResult> {
89 return runWorkspaceInitHook({

Callers

nothing calls this directly

Calls 3

getErrorMessageFunction · 0.90
logStepMethod · 0.80
statMethod · 0.65

Tested by

no test coverage detected