(data: ExtensionMetadataFile)
| 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. |
no outgoing calls
no test coverage detected