fix: a reply waiting for a tool approval is treated as finished (#34574)

When a reply stopped to wait for a tool approval, the chat treated it as finished: Regenerate showed up on it while the approval was still open, and in a voice call the answer that followed the approval was never spoken. The chat now shows such a reply as still in progress until the approval is answered and the answer is complete, so Regenerate stays hidden and a voice call speaks the answer.

Fixes #34572
This commit is contained in:
Classic298 authored and GitHub committed 2026-11-17 18:19:36 +09:00
1 parent c68b8a632e
commit c7dcba6b04
1 file changed
+4 -1
+4 -1
View File
@@ -3391,7 +3391,10 @@
message?.role === 'assistant' &&
(message.user_id ?? chat?.user_id) === $user?.id &&
!message.done &&
!messageHasPendingAskUser(message)
!messageHasPendingAskUser(message) &&
!message.output?.some(
(item) => item?.type === 'function_call' && item?.status === 'pending'
)
) {
message.done = true;
history = history;