mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-29 15:30:40 -07:00
Agents enabled.
This commit is contained in:
@@ -1535,7 +1535,7 @@ const SETTINGS_SCHEMA = {
|
||||
label: 'Enable Agents',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
default: true,
|
||||
description:
|
||||
'Enable local and remote subagents. Warning: Experimental feature, uses YOLO mode for subagents',
|
||||
showInDialog: false,
|
||||
|
||||
@@ -751,7 +751,7 @@ export class Config {
|
||||
this.model = params.model;
|
||||
this.disableLoopDetection = params.disableLoopDetection ?? false;
|
||||
this._activeModel = params.model;
|
||||
this.enableAgents = params.enableAgents ?? false;
|
||||
this.enableAgents = params.enableAgents ?? true;
|
||||
this.agents = params.agents ?? {};
|
||||
this.disableLLMCorrection = params.disableLLMCorrection ?? true;
|
||||
this.planEnabled = params.plan ?? false;
|
||||
@@ -2357,6 +2357,7 @@ export class Config {
|
||||
const maybeRegister = (
|
||||
toolClass: { name: string; Name?: string },
|
||||
registerFn: () => void,
|
||||
defaultEnabled = true,
|
||||
) => {
|
||||
const className = toolClass.name;
|
||||
const toolName = toolClass.Name || className;
|
||||
@@ -2364,7 +2365,7 @@ export class Config {
|
||||
// On some platforms, the className can be minified to _ClassName.
|
||||
const normalizedClassName = className.replace(/^_+/, '');
|
||||
|
||||
let isEnabled = true; // Enabled by default if coreTools is not set.
|
||||
let isEnabled = defaultEnabled; // Use provided default if coreTools is not set.
|
||||
if (coreTools) {
|
||||
isEnabled = coreTools.some(
|
||||
(tool) =>
|
||||
@@ -2396,18 +2397,24 @@ export class Config {
|
||||
errorString = String(error);
|
||||
}
|
||||
if (useRipgrep) {
|
||||
maybeRegister(RipGrepTool, () =>
|
||||
registry.registerTool(new RipGrepTool(this, this.messageBus)),
|
||||
maybeRegister(
|
||||
RipGrepTool,
|
||||
() => registry.registerTool(new RipGrepTool(this, this.messageBus)),
|
||||
false,
|
||||
);
|
||||
} else {
|
||||
logRipgrepFallback(this, new RipgrepFallbackEvent(errorString));
|
||||
maybeRegister(GrepTool, () =>
|
||||
registry.registerTool(new GrepTool(this, this.messageBus)),
|
||||
maybeRegister(
|
||||
GrepTool,
|
||||
() => registry.registerTool(new GrepTool(this, this.messageBus)),
|
||||
false,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
maybeRegister(GrepTool, () =>
|
||||
registry.registerTool(new GrepTool(this, this.messageBus)),
|
||||
maybeRegister(
|
||||
GrepTool,
|
||||
() => registry.registerTool(new GrepTool(this, this.messageBus)),
|
||||
false,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ describe('Core System Prompt (prompts.ts)', () => {
|
||||
},
|
||||
isInteractive: vi.fn().mockReturnValue(true),
|
||||
isInteractiveShellEnabled: vi.fn().mockReturnValue(true),
|
||||
isAgentsEnabled: vi.fn().mockReturnValue(false),
|
||||
isAgentsEnabled: vi.fn().mockReturnValue(true),
|
||||
getPreviewFeatures: vi.fn().mockReturnValue(true),
|
||||
getModel: vi.fn().mockReturnValue(DEFAULT_GEMINI_MODEL_AUTO),
|
||||
getActiveModel: vi.fn().mockReturnValue(DEFAULT_GEMINI_MODEL),
|
||||
@@ -375,7 +375,7 @@ describe('Core System Prompt (prompts.ts)', () => {
|
||||
},
|
||||
isInteractive: vi.fn().mockReturnValue(false),
|
||||
isInteractiveShellEnabled: vi.fn().mockReturnValue(false),
|
||||
isAgentsEnabled: vi.fn().mockReturnValue(false),
|
||||
isAgentsEnabled: vi.fn().mockReturnValue(true),
|
||||
getModel: vi.fn().mockReturnValue('auto'),
|
||||
getActiveModel: vi.fn().mockReturnValue(PREVIEW_GEMINI_MODEL),
|
||||
getPreviewFeatures: vi.fn().mockReturnValue(true),
|
||||
|
||||
@@ -1492,8 +1492,8 @@
|
||||
"enableAgents": {
|
||||
"title": "Enable Agents",
|
||||
"description": "Enable local and remote subagents. Warning: Experimental feature, uses YOLO mode for subagents",
|
||||
"markdownDescription": "Enable local and remote subagents. Warning: Experimental feature, uses YOLO mode for subagents\n\n- Category: `Experimental`\n- Requires restart: `yes`\n- Default: `false`",
|
||||
"default": false,
|
||||
"markdownDescription": "Enable local and remote subagents. Warning: Experimental feature, uses YOLO mode for subagents\n\n- Category: `Experimental`\n- Requires restart: `yes`\n- Default: `true`",
|
||||
"default": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
"extensionManagement": {
|
||||
|
||||
Reference in New Issue
Block a user