FIX: Final summary sometimes missing

This PR fixes an issue where the summary updater sometimes doesn't show the last update. Due to some timing issues with the summary updater and the component this seems to happen. By explicitly calling set raw after the cooked, we ensure the final summary will always be set.

No tests as this timing issue is difficult to test.
This commit is contained in:
Keegan George 2024-11-06 12:00:35 -08:00
parent 9505a8976c
commit 943aa7468d
No known key found for this signature in database
GPG Key ID: 91B40E38537AC000
1 changed files with 4 additions and 0 deletions

View File

@ -113,6 +113,10 @@ export async function applyProgress(status, updater) {
if (status.cooked) { if (status.cooked) {
await updater.setCooked(status.cooked); await updater.setCooked(status.cooked);
} }
// Ensure the final summary is set
if (status.raw !== undefined) {
await updater.setRaw(status.raw, true);
}
updater.streaming = false; updater.streaming = false;
} }