mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-12 21:03:05 -07:00
feat(scheduler): support multi-scheduler tool aggregation and nested call IDs (#17429)
This commit is contained in:
@@ -29,6 +29,7 @@ import {
|
||||
import type { SchedulerStateManager } from './state-manager.js';
|
||||
import type { ToolModificationHandler } from './tool-modifier.js';
|
||||
import type { ValidatingToolCall, WaitingToolCall } from './types.js';
|
||||
import { ROOT_SCHEDULER_ID } from './types.js';
|
||||
import type { Config } from '../config/config.js';
|
||||
import type { EditorType } from '../utils/editor.js';
|
||||
import { randomUUID } from 'node:crypto';
|
||||
@@ -52,7 +53,7 @@ describe('confirmation.ts', () => {
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
vi.clearAllMocks();
|
||||
vi.restoreAllMocks();
|
||||
});
|
||||
|
||||
const emitResponse = (response: ToolConfirmationResponse) => {
|
||||
@@ -188,6 +189,7 @@ describe('confirmation.ts', () => {
|
||||
state: mockState,
|
||||
modifier: mockModifier,
|
||||
getPreferredEditor,
|
||||
schedulerId: ROOT_SCHEDULER_ID,
|
||||
});
|
||||
|
||||
expect(result.outcome).toBe(ToolConfirmationOutcome.ProceedOnce);
|
||||
@@ -217,6 +219,7 @@ describe('confirmation.ts', () => {
|
||||
state: mockState,
|
||||
modifier: mockModifier,
|
||||
getPreferredEditor,
|
||||
schedulerId: ROOT_SCHEDULER_ID,
|
||||
});
|
||||
await listenerPromise;
|
||||
|
||||
@@ -252,6 +255,7 @@ describe('confirmation.ts', () => {
|
||||
state: mockState,
|
||||
modifier: mockModifier,
|
||||
getPreferredEditor,
|
||||
schedulerId: ROOT_SCHEDULER_ID,
|
||||
});
|
||||
|
||||
await waitForListener(MessageBusType.TOOL_CONFIRMATION_RESPONSE);
|
||||
@@ -293,6 +297,7 @@ describe('confirmation.ts', () => {
|
||||
state: mockState,
|
||||
modifier: mockModifier,
|
||||
getPreferredEditor,
|
||||
schedulerId: ROOT_SCHEDULER_ID,
|
||||
});
|
||||
|
||||
await listenerPromise1;
|
||||
@@ -351,6 +356,7 @@ describe('confirmation.ts', () => {
|
||||
state: mockState,
|
||||
modifier: mockModifier,
|
||||
getPreferredEditor,
|
||||
schedulerId: ROOT_SCHEDULER_ID,
|
||||
});
|
||||
|
||||
await listenerPromise;
|
||||
@@ -397,6 +403,7 @@ describe('confirmation.ts', () => {
|
||||
state: mockState,
|
||||
modifier: mockModifier,
|
||||
getPreferredEditor,
|
||||
schedulerId: ROOT_SCHEDULER_ID,
|
||||
});
|
||||
|
||||
const result = await promise;
|
||||
@@ -420,6 +427,7 @@ describe('confirmation.ts', () => {
|
||||
state: mockState,
|
||||
modifier: mockModifier,
|
||||
getPreferredEditor,
|
||||
schedulerId: ROOT_SCHEDULER_ID,
|
||||
}),
|
||||
).rejects.toThrow(/lost during confirmation loop/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user