feat(core): refactor shell execution to use node-pty (#6088)

This commit is contained in:
Gal Zahavi
2025-08-14 13:40:12 -07:00
committed by GitHub
parent 48af0456c1
commit 980091cbc2
16 changed files with 453 additions and 409 deletions

View File

@@ -34,6 +34,13 @@ import {
HistoryItemToolGroup,
} from '../types.js';
vi.mock('./useTerminalSize', () => ({
useTerminalSize: () => ({
columns: 80,
rows: 24,
}),
}));
// Mocks
vi.mock('@google/gemini-cli-core', async () => {
const actual = await vi.importActual('@google/gemini-cli-core');
@@ -179,6 +186,8 @@ describe('useReactToolScheduler in YOLO Mode', () => {
request.args,
expect.any(AbortSignal),
undefined,
80,
24,
);
// Check that onComplete was called with success
@@ -326,6 +335,8 @@ describe('useReactToolScheduler', () => {
request.args,
expect.any(AbortSignal),
undefined,
80,
24,
);
expect(onComplete).toHaveBeenCalledWith([
expect.objectContaining({