fix(ui): ensure rationale renders before tool calls (#17043)

This commit is contained in:
N. Taylor Mullen
2026-01-19 17:22:15 -08:00
committed by GitHub
parent 1b6b6d40d5
commit 0bebc664c1
2 changed files with 99 additions and 0 deletions
@@ -923,6 +923,10 @@ export const useGeminiStream = (
}
}
if (toolCallRequests.length > 0) {
if (pendingHistoryItemRef.current) {
addItem(pendingHistoryItemRef.current, userMessageTimestamp);
setPendingHistoryItem(null);
}
await scheduleToolCalls(toolCallRequests, signal);
}
return StreamProcessingStatus.Completed;
@@ -940,6 +944,9 @@ export const useGeminiStream = (
handleChatModelEvent,
handleAgentExecutionStoppedEvent,
handleAgentExecutionBlockedEvent,
addItem,
pendingHistoryItemRef,
setPendingHistoryItem,
],
);
const submitQuery = useCallback(