mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-02 16:04:38 -07:00
(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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user