feat: add click-to-focus support for interactive shell (#13341)

This commit is contained in:
Gal Zahavi
2025-11-19 15:49:39 -08:00
committed by GitHub
parent d0a845b6e6
commit 2231497b1f
17 changed files with 1072 additions and 416 deletions

View File

@@ -419,11 +419,10 @@ describe('useShellCommandProcessor', () => {
});
await act(async () => await execPromise);
const finalHistoryItem = addItemToHistoryMock.mock.calls[1][0];
expect(finalHistoryItem.tools[0].status).toBe(ToolCallStatus.Canceled);
expect(finalHistoryItem.tools[0].resultDisplay).toContain(
'Command was cancelled.',
);
// With the new logic, cancelled commands are not added to history by this hook
// to avoid duplication/flickering, as they are handled by useGeminiStream.
expect(addItemToHistoryMock).toHaveBeenCalledTimes(1);
expect(setPendingHistoryItemMock).toHaveBeenCalledWith(null);
expect(setShellInputFocusedMock).toHaveBeenCalledWith(false);
});