(feat): Add a ToDo tool to track ongoing task lists (#8761)

Co-authored-by: joshualitt <joshualitt@google.com>
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
Co-authored-by: matt korwel <matt.korwel@gmail.com>
Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
Co-authored-by: Jacob MacDonald <jakemac@google.com>
Co-authored-by: Shreya Keshive <skeshive@gmail.com>
This commit is contained in:
anj-s
2025-09-20 06:01:02 -07:00
committed by GitHub
parent 22a560a990
commit 44691a4ce6
7 changed files with 341 additions and 0 deletions
+11
View File
@@ -50,6 +50,7 @@ import {
import { shouldAttemptBrowserLaunch } from '../utils/browser.js';
import type { MCPOAuthConfig } from '../mcp/oauth-provider.js';
import { ideContextStore } from '../ide/ideContext.js';
import { WriteTodosTool } from '../tools/write-todos.js';
import type { FileSystemService } from '../services/fileSystemService.js';
import { StandardFileSystemService } from '../services/fileSystemService.js';
import {
@@ -245,6 +246,7 @@ export interface ConfigParameters {
enableToolOutputTruncation?: boolean;
eventEmitter?: EventEmitter;
useSmartEdit?: boolean;
useWriteTodos?: boolean;
policyEngineConfig?: PolicyEngineConfig;
output?: OutputSettings;
useModelRouter?: boolean;
@@ -332,6 +334,7 @@ export class Config {
private readonly fileExclusions: FileExclusions;
private readonly eventEmitter?: EventEmitter;
private readonly useSmartEdit: boolean;
private readonly useWriteTodos: boolean;
private readonly messageBus: MessageBus;
private readonly policyEngine: PolicyEngine;
private readonly outputSettings: OutputSettings;
@@ -421,6 +424,7 @@ export class Config {
this.enableToolOutputTruncation =
params.enableToolOutputTruncation ?? false;
this.useSmartEdit = params.useSmartEdit ?? true;
this.useWriteTodos = params.useWriteTodos ?? false;
this.useModelRouter = params.useModelRouter ?? false;
this.extensionManagement = params.extensionManagement ?? true;
this.storage = new Storage(this.targetDir);
@@ -947,6 +951,10 @@ export class Config {
return this.useSmartEdit;
}
getUseWriteTodos(): boolean {
return this.useWriteTodos;
}
getOutputFormat(): OutputFormat {
return this.outputSettings?.format
? this.outputSettings.format
@@ -1047,6 +1055,9 @@ export class Config {
registerCoreTool(ShellTool, this);
registerCoreTool(MemoryTool);
registerCoreTool(WebSearchTool, this);
if (this.getUseWriteTodos()) {
registerCoreTool(WriteTodosTool, this);
}
await registry.discoverAllTools();
return registry;