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

Method save

src/node/services/ExtensionMetadataService.ts:171–183  ·  view source on GitHub ↗
(data: ExtensionMetadataFile)

Source from the content-addressed store, hash-verified

169 }
170
171 private async save(data: ExtensionMetadataFile): Promise<void> {
172 // Throws on failure so callers that need to know whether the write
173 // actually happened (e.g. AgentStatusService dedup) can react.
174 // emitWorkspaceActivityUpdate (the historical wrapper used elsewhere)
175 // downgrades throws to logged warnings for log-and-continue paths.
176 try {
177 const content = JSON.stringify(data, null, 2);
178 await writeFileAtomic(this.filePath, content, "utf-8");
179 } catch (error) {
180 log.error("Failed to save metadata:", error);
181 throw error;
182 }
183 }
184
185 /**
186 * Update the recency timestamp for a workspace.

Callers 8

setSidebarStatusMethod · 0.95
deleteWorkspaceMethod · 0.95
clearStaleStreamingMethod · 0.95
renderMethod · 0.80
handleSaveFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected