mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-03 06:00:49 +00:00
use pending history item for shell mode, update as output is received (#471)
This commit is contained in:
parent
01dbc61d1c
commit
00ab1905e0
3 changed files with 27 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue