mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 07:10:55 +00:00
refactor: Centralize tool scheduling logic and simplify React hook (#670)
This commit is contained in:
parent
edc12e416d
commit
f2a8d39f42
9 changed files with 938 additions and 758 deletions
|
|
@ -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(),
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue