Keep the question dock aligned with the native pending call

This commit is contained in:
Hadrien Cornier
2026-10-27 22:58:00 -05:00
parent 3dd52110bb
commit 82f0b59355
3 changed files with 50 additions and 5 deletions
+2 -1
View File
@@ -70,6 +70,7 @@ import { CoverageRing } from "@/components/extraction-coverage";
import { Button } from "@/components/ui/button";
import {
activeProblemOf,
danglingQuestionOf,
dismissedAnswer,
endsInFailedTurn,
findPendingToolCall,
@@ -444,7 +445,7 @@ export function Chat({
// mount-only by design (turnInFlight read at initial value)
}, []);
const pending = findPendingToolCall(messages);
const pending = findPendingToolCall(messages, danglingQuestionOf(nativeMessages)?.toolCallId ?? null);
// The abort handler reads the pending question from a ref (the window
// listener is mount-scoped; the value it needs is render-scoped).
const pendingRef = useRef(pending);