(workspaceId: string, data: SessionUsageFile)
| 133 | } |
| 134 | |
| 135 | private async writeFile(workspaceId: string, data: SessionUsageFile): Promise<void> { |
| 136 | const filePath = this.getFilePath(workspaceId); |
| 137 | await fs.mkdir(path.dirname(filePath), { recursive: true }); |
| 138 | await writeFileAtomic(filePath, JSON.stringify(data, null, 2)); |
| 139 | } |
| 140 | |
| 141 | /** |
| 142 | * Record usage from a completed stream. Accumulates with existing usage |
no test coverage detected