Refactor managed execution state for virtual backgrounding

This commit is contained in:
Adam Weidman
2026-03-08 17:14:41 -04:00
parent ba90cc2538
commit b2c7fe1367
4 changed files with 171 additions and 133 deletions

View File

@@ -313,9 +313,9 @@ export const useGeminiStream = (
const activeToolPtyId = useMemo(() => {
const executingBackgroundableTool = toolCalls.find(
(tc): tc is TrackedExecutingToolCall =>
tc.status === CoreToolCallStatus.Executing &&
typeof tc.pid === 'number',
(toolCall): toolCall is TrackedExecutingToolCall =>
toolCall.status === CoreToolCallStatus.Executing &&
typeof toolCall.pid === 'number',
);
return executingBackgroundableTool?.pid;
}, [toolCalls]);