feat(plan): conditionally add enter/exit plan mode tools based on current mode (#24378)

This commit is contained in:
ruomeng
2026-04-01 11:56:10 -04:00
committed by GitHub
parent ca43f8c291
commit eb95e99b3d
4 changed files with 50 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ import {
ToolRegistry,
COMMON_IGNORE_PATTERNS,
GEMINI_IGNORE_FILE_NAME,
ApprovalMode,
// DEFAULT_FILE_EXCLUDES,
CoreToolCallStatus,
type Config,
@@ -146,6 +147,7 @@ describe('handleAtCommand', () => {
getClient: () => undefined,
}),
getMessageBus: () => mockMessageBus,
getApprovalMode: () => ApprovalMode.DEFAULT,
} as unknown as Config;
const registry = new ToolRegistry(mockConfig, mockMessageBus);

View File

@@ -18,6 +18,7 @@ import {
StandardFileSystemService,
ToolRegistry,
COMMON_IGNORE_PATTERNS,
ApprovalMode,
} from '@google/gemini-cli-core';
import * as os from 'node:os';
import type { UseHistoryManagerReturn } from './useHistoryManager.js';
@@ -136,6 +137,7 @@ describe('handleAtCommand with Agents', () => {
getMessageBus: () => mockMessageBus,
interactive: true,
getAgentRegistry: () => mockAgentRegistry,
getApprovalMode: () => ApprovalMode.DEFAULT,
} as unknown as Config;
const registry = new ToolRegistry(mockConfig, mockMessageBus);