mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-12 23:21:27 -07:00
feat(core): Disable todos for 3 family. (#85)
* feat(core): Disable todos for 3 family. * tidy
This commit is contained in:
committed by
Tommaso Sciortino
parent
4cee7e83c4
commit
0188599642
@@ -766,6 +766,40 @@ describe('Server Config (config.ts)', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('UseWriteTodos Configuration', () => {
|
||||
it('should default useWriteTodos to true when not provided', () => {
|
||||
const config = new Config(baseParams);
|
||||
expect(config.getUseWriteTodos()).toBe(true);
|
||||
});
|
||||
|
||||
it('should set useWriteTodos to false when provided as false', () => {
|
||||
const params: ConfigParameters = {
|
||||
...baseParams,
|
||||
useWriteTodos: false,
|
||||
};
|
||||
const config = new Config(params);
|
||||
expect(config.getUseWriteTodos()).toBe(false);
|
||||
});
|
||||
|
||||
it('should disable useWriteTodos for preview models', () => {
|
||||
const params: ConfigParameters = {
|
||||
...baseParams,
|
||||
model: 'gemini-3-pro-preview',
|
||||
};
|
||||
const config = new Config(params);
|
||||
expect(config.getUseWriteTodos()).toBe(false);
|
||||
});
|
||||
|
||||
it('should NOT disable useWriteTodos for non-preview models', () => {
|
||||
const params: ConfigParameters = {
|
||||
...baseParams,
|
||||
model: 'gemini-2.5-pro',
|
||||
};
|
||||
const config = new Config(params);
|
||||
expect(config.getUseWriteTodos()).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Shell Tool Inactivity Timeout', () => {
|
||||
it('should default to 300000ms (300 seconds) when not provided', () => {
|
||||
const config = new Config(baseParams);
|
||||
|
||||
@@ -49,6 +49,7 @@ import {
|
||||
DEFAULT_GEMINI_EMBEDDING_MODEL,
|
||||
DEFAULT_GEMINI_FLASH_MODEL,
|
||||
DEFAULT_THINKING_MODE,
|
||||
isPreviewModel,
|
||||
} from './models.js';
|
||||
import { shouldAttemptBrowserLaunch } from '../utils/browser.js';
|
||||
import type { MCPOAuthConfig } from '../mcp/oauth-provider.js';
|
||||
@@ -549,7 +550,10 @@ export class Config {
|
||||
params.truncateToolOutputLines ?? DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES;
|
||||
this.enableToolOutputTruncation = params.enableToolOutputTruncation ?? true;
|
||||
this.useSmartEdit = params.useSmartEdit ?? true;
|
||||
this.useWriteTodos = params.useWriteTodos ?? true;
|
||||
// // TODO(joshualitt): Re-evaluate the todo tool for 3 family.
|
||||
this.useWriteTodos = isPreviewModel(this.model)
|
||||
? false
|
||||
: (params.useWriteTodos ?? true);
|
||||
this.enableHooks = params.enableHooks ?? false;
|
||||
this.disabledHooks =
|
||||
(params.hooks && 'disabled' in params.hooks
|
||||
|
||||
Reference in New Issue
Block a user