* Snapshot the current streaming generation and fire a streaming=false metadata update. * Accepts an optional pre-captured generation for callers that need to snapshot before * async work (e.g., handleStreamCompletion captures before updateRecencyTimestamp so a * concurrent stream-start won
(workspaceId: string, capturedGeneration?: number)
| 2519 | * concurrent stream-start won't cause the stop to silently overwrite the newer stream). |
| 2520 | */ |
| 2521 | private stopStreamingStatus(workspaceId: string, capturedGeneration?: number): Promise<void> { |
| 2522 | const generation = capturedGeneration ?? this.streamingGenerations.get(workspaceId) ?? 0; |
| 2523 | return this.updateStreamingStatus(workspaceId, false, { generation }); |
| 2524 | } |
| 2525 | |
| 2526 | private async handleStreamCompletion(workspaceId: string): Promise<void> { |
| 2527 | const generation = this.streamingGenerations.get(workspaceId) ?? 0; |
no test coverage detected