MCPcopy Index your code
hub / github.com/coder/mux / getOrCreateWorkspaceData

Method getOrCreateWorkspaceData

src/node/services/devToolsService.ts:380–394  ·  view source on GitHub ↗
(workspaceId: string)

Source from the content-addressed store, hash-verified

378 }
379
380 private getOrCreateWorkspaceData(workspaceId: string): WorkspaceData {
381 let data = this.workspaces.get(workspaceId);
382 if (data) {
383 return data;
384 }
385
386 data = {
387 runs: new Map<string, DevToolsRun>(),
388 steps: new Map<string, DevToolsStep>(),
389 loaded: false,
390 clearGeneration: 0,
391 };
392 this.workspaces.set(workspaceId, data);
393 return data;
394 }
395
396 private async ensureLoaded(workspaceId: string): Promise<void> {
397 const data = this.getOrCreateWorkspaceData(workspaceId);

Callers 8

createRunMethod · 0.95
createStepMethod · 0.95
updateStepMethod · 0.95
finalizeStaleStepsMethod · 0.95
getRunsMethod · 0.95
getRunWithStepsMethod · 0.95
clearMethod · 0.95
ensureLoadedMethod · 0.95

Calls 2

setMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected