Merge contributor foundation for pending-question authority

This commit is contained in:
amosblomqvist
2026-10-28 23:23:46 +02:00
3 changed files with 50 additions and 5 deletions
+2 -1
View File
@@ -72,6 +72,7 @@ import { CoverageRing } from "@/components/extraction-coverage";
import { Button } from "@/components/ui/button";
import {
activeProblemOf,
danglingQuestionOf,
dismissedAnswer,
endsInFailedTurn,
findPendingToolCall,
@@ -446,7 +447,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);