use pending history item for shell mode, update as output is received (#471)

This commit is contained in:
Olcan
2025-05-21 13:16:50 -07:00
committed by GitHub
parent 01dbc61d1c
commit 00ab1905e0
3 changed files with 27 additions and 6 deletions

View File

@@ -15,6 +15,7 @@ import type { exec as ExecType } from 'child_process'; // For typing the injecte
// Mocks
const mockAddItemToHistory = vi.fn();
const mockSetPendingHistoryItem = vi.fn();
const mockOnExec = vi.fn(async (promise) => await promise);
const mockOnDebugMessage = vi.fn();
const mockGetTargetDir = vi.fn();
@@ -94,6 +95,7 @@ describe('useShellCommandProcessor', () => {
renderHook(() =>
useShellCommandProcessor(
mockAddItemToHistory,
mockSetPendingHistoryItem,
mockOnExec,
mockOnDebugMessage,
mockConfig,