refactor: Centralize tool scheduling logic and simplify React hook (#670)

This commit is contained in:
N. Taylor Mullen
2025-06-01 14:16:24 -07:00
committed by GitHub
parent edc12e416d
commit f2a8d39f42
9 changed files with 938 additions and 758 deletions

View File

@@ -9,11 +9,11 @@ import { mergePartListUnions } from './useGeminiStream.js';
import { Part, PartListUnion } from '@google/genai';
// Mock useToolScheduler
vi.mock('./useToolScheduler', async () => {
const actual = await vi.importActual('./useToolScheduler');
vi.mock('./useReactToolScheduler', async () => {
const actual = await vi.importActual('./useReactToolScheduler');
return {
...actual, // We need mapToDisplay from actual
useToolScheduler: vi.fn(),
useReactToolScheduler: vi.fn(),
};
});