mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-13 06:40:33 -07:00
fix(a2a): Don't mutate 'replace' tool args in scheduleToolCalls (#7369)
Co-authored-by: Abhi <43648792+abhipatel12@users.noreply.github.com>
This commit is contained in:
@@ -33,6 +33,7 @@ import {
|
||||
assertTaskCreationAndWorkingStatus,
|
||||
createStreamMessageRequest,
|
||||
MockTool,
|
||||
createMockConfig,
|
||||
} from './testing_utils.js';
|
||||
|
||||
const mockToolConfirmationFn = async () =>
|
||||
@@ -68,26 +69,11 @@ vi.mock('./config.js', async () => {
|
||||
return {
|
||||
...actual,
|
||||
loadConfig: vi.fn().mockImplementation(async () => {
|
||||
config = {
|
||||
const mockConfig = createMockConfig({
|
||||
getToolRegistry: getToolRegistrySpy,
|
||||
getApprovalMode: getApprovalModeSpy,
|
||||
getIdeMode: vi.fn().mockReturnValue(false),
|
||||
getAllowedTools: vi.fn().mockReturnValue([]),
|
||||
getIdeClient: vi.fn(),
|
||||
getWorkspaceContext: vi.fn().mockReturnValue({
|
||||
isPathWithinWorkspace: () => true,
|
||||
}),
|
||||
getTargetDir: () => '/test',
|
||||
getGeminiClient: vi.fn(),
|
||||
getDebugMode: vi.fn().mockReturnValue(false),
|
||||
getContentGeneratorConfig: vi
|
||||
.fn()
|
||||
.mockReturnValue({ model: 'gemini-pro' }),
|
||||
getModel: vi.fn().mockReturnValue('gemini-pro'),
|
||||
getUsageStatisticsEnabled: vi.fn().mockReturnValue(false),
|
||||
setFlashFallbackHandler: vi.fn(),
|
||||
initialize: vi.fn().mockResolvedValue(undefined),
|
||||
} as unknown as Config;
|
||||
});
|
||||
config = mockConfig as Config;
|
||||
return config;
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user