* Reset a workspace's persisted cost ledger while keeping copied chat history intact. * * Forked workspaces need an explicit empty session-usage.json so later reads do not * rebuild historical costs from the copied messages.
(workspaceId: string)
| 373 | * rebuild historical costs from the copied messages. |
| 374 | */ |
| 375 | async resetSessionUsage(workspaceId: string): Promise<void> { |
| 376 | return this.fileLocks.withLock(workspaceId, async () => { |
| 377 | await this.writeFile(workspaceId, this.createEmptyUsageFile()); |
| 378 | }); |
| 379 | } |
| 380 | |
| 381 | /** |
| 382 | * Batch fetch session usage for multiple workspaces. |
no test coverage detected