Update modify-reports-transform-helper to display elapsed time only when all edits are complete, ensuring accurate reporting during the editing process.

This commit is contained in:
dal 2025-08-21 21:53:13 -06:00
parent 65260104c1
commit 60d7bd67d1
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
1 changed files with 9 additions and 2 deletions

View File

@ -66,9 +66,16 @@ export function createModifyReportsReasoningEntry(
}
}
// Calculate elapsed time when complete
// Only show elapsed time when all edits are complete (not during streaming)
// Check if all edits have a final status (completed or failed), not just 'loading'
const allEditsComplete = state.edits?.every(
(edit) => edit.status === 'completed' || edit.status === 'failed'
) ?? false;
if (allEditsComplete) {
secondaryTitle = formatElapsedTime(state.startTime);
}
}
return {
id: toolCallId,