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

Method syncWorkspaces

src/browser/stores/RuntimeStatusStore.ts:68–85  ·  view source on GitHub ↗
(metadata: Map<string, FrontendWorkspaceMetadata>)

Source from the content-addressed store, hash-verified

66 }
67
68 syncWorkspaces(metadata: Map<string, FrontendWorkspaceMetadata>): void {
69 if (!this.isActive && metadata.size > 0) {
70 this.isActive = true;
71 }
72
73 this.workspaceMetadata = metadata;
74
75 for (const workspaceId of Array.from(this.statusCache.keys())) {
76 const workspace = metadata.get(workspaceId);
77 if (!workspace || !isDevcontainerRuntime(workspace.runtimeConfig)) {
78 this.statusCache.delete(workspaceId);
79 this.statuses.delete(workspaceId);
80 }
81 }
82
83 this.refreshController.bindListeners();
84 this.refreshController.requestImmediate();
85 }
86
87 invalidateWorkspace(workspaceId: string): void {
88 this.statusCache.delete(workspaceId);

Callers

nothing calls this directly

Calls 5

isDevcontainerRuntimeFunction · 0.90
bindListenersMethod · 0.80
requestImmediateMethod · 0.80
getMethod · 0.65
deleteMethod · 0.45

Tested by

no test coverage detected