feat(shell): enable interactive commands with virtual terminal (#6694)

This commit is contained in:
Gal Zahavi
2025-09-11 13:27:27 -07:00
committed by GitHub
parent 8969a232ec
commit 181898cb5d
43 changed files with 2345 additions and 324 deletions
@@ -68,6 +68,7 @@ const mockConfig = {
}),
getUseSmartEdit: () => false,
getGeminiClient: () => null, // No client needed for these tests
getShellExecutionConfig: () => ({ terminalWidth: 80, terminalHeight: 24 }),
} as unknown as Config;
const mockTool = new MockTool({
@@ -124,7 +125,6 @@ describe('useReactToolScheduler in YOLO Mode', () => {
onComplete,
mockConfig as unknown as Config,
setPendingHistoryItem,
() => undefined,
() => {},
),
);
@@ -163,7 +163,7 @@ describe('useReactToolScheduler in YOLO Mode', () => {
expect(mockToolRequiresConfirmation.execute).toHaveBeenCalledWith(
request.args,
expect.any(AbortSignal),
undefined /*updateOutputFn*/,
undefined,
);
// Check that onComplete was called with success
@@ -272,7 +272,6 @@ describe('useReactToolScheduler', () => {
onComplete,
mockConfig as unknown as Config,
setPendingHistoryItem,
() => undefined,
() => {},
),
);
@@ -314,7 +313,7 @@ describe('useReactToolScheduler', () => {
expect(mockTool.execute).toHaveBeenCalledWith(
request.args,
expect.any(AbortSignal),
undefined /*updateOutputFn*/,
undefined,
);
expect(onComplete).toHaveBeenCalledWith([
expect.objectContaining({