* Write state to disk. * Logs errors but doesn't throw (fire-and-forget pattern).
(
workspaceId: string,
state: TState,
options?: SessionFileWriteOptions
)
| 106 | * Logs errors but doesn't throw (fire-and-forget pattern). |
| 107 | */ |
| 108 | async persist( |
| 109 | workspaceId: string, |
| 110 | state: TState, |
| 111 | options?: SessionFileWriteOptions |
| 112 | ): Promise<void> { |
| 113 | const result = await this.fileManager.write(workspaceId, state, options); |
| 114 | if (!result.success) { |
| 115 | log.error(`[${this.storeName}] Failed to persist state for ${workspaceId}: ${result.error}`); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * Delete persisted state from disk. |
no test coverage detected