diff --git a/docs/get-started/configuration.md b/docs/get-started/configuration.md index db9161aaf8..246617854c 100644 --- a/docs/get-started/configuration.md +++ b/docs/get-started/configuration.md @@ -709,12 +709,6 @@ their corresponding top-level category object in your `settings.json` file. - **Default:** `undefined` - **Requires restart:** Yes -#### `useSmartEdit` - -- **`useSmartEdit`** (boolean): - - **Description:** Enable the smart-edit tool instead of the replace tool. - - **Default:** `true` - #### `useWriteTodos` - **`useWriteTodos`** (boolean): diff --git a/packages/cli/src/config/config.ts b/packages/cli/src/config/config.ts index 28e1d8a629..e842a5ca54 100755 --- a/packages/cli/src/config/config.ts +++ b/packages/cli/src/config/config.ts @@ -73,7 +73,6 @@ export interface CliArgs { deleteSession: string | undefined; includeDirectories: string[] | undefined; screenReader: boolean | undefined; - useSmartEdit: boolean | undefined; useWriteTodos: boolean | undefined; outputFormat: string | undefined; fakeResponses: string | undefined; @@ -689,7 +688,6 @@ export async function loadCliConfig( truncateToolOutputLines: settings.tools?.truncateToolOutputLines, enableToolOutputTruncation: settings.tools?.enableToolOutputTruncation, eventEmitter: appEvents, - useSmartEdit: argv.useSmartEdit ?? settings.useSmartEdit, useWriteTodos: argv.useWriteTodos ?? settings.useWriteTodos, output: { format: (argv.outputFormat ?? settings.output?.format) as OutputFormat, diff --git a/packages/cli/src/config/settingsSchema.ts b/packages/cli/src/config/settingsSchema.ts index 7672b9e1c4..ff9ce70b78 100644 --- a/packages/cli/src/config/settingsSchema.ts +++ b/packages/cli/src/config/settingsSchema.ts @@ -1126,15 +1126,6 @@ const SETTINGS_SCHEMA = { }, }, }, - useSmartEdit: { - type: 'boolean', - label: 'Use Smart Edit', - category: 'Advanced', - requiresRestart: false, - default: true, - description: 'Enable the smart-edit tool instead of the replace tool.', - showInDialog: false, - }, useWriteTodos: { type: 'boolean', label: 'Use WriteTodos', diff --git a/packages/cli/src/gemini.test.tsx b/packages/cli/src/gemini.test.tsx index a6905f736a..f98cd7c3c9 100644 --- a/packages/cli/src/gemini.test.tsx +++ b/packages/cli/src/gemini.test.tsx @@ -546,7 +546,6 @@ describe('gemini.tsx main function kitty protocol', () => { listExtensions: undefined, includeDirectories: undefined, screenReader: undefined, - useSmartEdit: undefined, useWriteTodos: undefined, resume: undefined, listSessions: undefined, diff --git a/packages/cli/src/ui/hooks/useGeminiStream.test.tsx b/packages/cli/src/ui/hooks/useGeminiStream.test.tsx index 8847995568..7c1b3a7dc9 100644 --- a/packages/cli/src/ui/hooks/useGeminiStream.test.tsx +++ b/packages/cli/src/ui/hooks/useGeminiStream.test.tsx @@ -220,7 +220,6 @@ describe('useGeminiStream', () => { getContentGeneratorConfig: vi .fn() .mockReturnValue(contentGeneratorConfig), - getUseSmartEdit: () => false, isInteractive: () => false, getExperiments: () => {}, } as unknown as Config; diff --git a/packages/cli/src/ui/hooks/useToolScheduler.test.ts b/packages/cli/src/ui/hooks/useToolScheduler.test.ts index 68dd1122a6..69767198c6 100644 --- a/packages/cli/src/ui/hooks/useToolScheduler.test.ts +++ b/packages/cli/src/ui/hooks/useToolScheduler.test.ts @@ -77,7 +77,6 @@ const mockConfig = { model: 'test-model', authType: 'oauth-personal', }), - getUseSmartEdit: () => false, getGeminiClient: () => null, // No client needed for these tests getShellExecutionConfig: () => ({ terminalWidth: 80, terminalHeight: 24 }), getMessageBus: () => null, diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index 8fee660edd..22640799e2 100644 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -25,7 +25,6 @@ import { GrepTool } from '../tools/grep.js'; import { canUseRipgrep, RipGrepTool } from '../tools/ripGrep.js'; import { GlobTool } from '../tools/glob.js'; import { ActivateSkillTool } from '../tools/activate-skill.js'; -import { EditTool } from '../tools/edit.js'; import { SmartEditTool } from '../tools/smart-edit.js'; import { ShellTool } from '../tools/shell.js'; import { WriteFileTool } from '../tools/write-file.js'; @@ -329,7 +328,6 @@ export interface ConfigParameters { truncateToolOutputLines?: number; enableToolOutputTruncation?: boolean; eventEmitter?: EventEmitter; - useSmartEdit?: boolean; useWriteTodos?: boolean; policyEngineConfig?: PolicyEngineConfig; output?: OutputSettings; @@ -454,7 +452,6 @@ export class Config { readonly storage: Storage; private readonly fileExclusions: FileExclusions; private readonly eventEmitter?: EventEmitter; - private readonly useSmartEdit: boolean; private readonly useWriteTodos: boolean; private readonly messageBus: MessageBus; private readonly policyEngine: PolicyEngine; @@ -594,7 +591,6 @@ export class Config { this.truncateToolOutputLines = params.truncateToolOutputLines ?? DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES; this.enableToolOutputTruncation = params.enableToolOutputTruncation ?? true; - this.useSmartEdit = params.useSmartEdit ?? true; // // TODO(joshualitt): Re-evaluate the todo tool for 3 family. this.useWriteTodos = isPreviewModel(this.model) ? false @@ -1594,10 +1590,6 @@ export class Config { return this.truncateToolOutputLines; } - getUseSmartEdit(): boolean { - return this.useSmartEdit; - } - getUseWriteTodos(): boolean { return this.useWriteTodos; } @@ -1699,11 +1691,7 @@ export class Config { registerCoreTool(GlobTool, this); registerCoreTool(ActivateSkillTool, this); - if (this.getUseSmartEdit()) { - registerCoreTool(SmartEditTool, this); - } else { - registerCoreTool(EditTool, this); - } + registerCoreTool(SmartEditTool, this); registerCoreTool(WriteFileTool, this); registerCoreTool(WebFetchTool, this); registerCoreTool(ShellTool, this); diff --git a/packages/core/src/core/client.test.ts b/packages/core/src/core/client.test.ts index 653608bb17..34facc4737 100644 --- a/packages/core/src/core/client.test.ts +++ b/packages/core/src/core/client.test.ts @@ -251,7 +251,6 @@ describe('Gemini Client (client.ts)', () => { getEnableHooks: vi.fn().mockReturnValue(false), getChatCompression: vi.fn().mockReturnValue(undefined), getSkipNextSpeakerCheck: vi.fn().mockReturnValue(false), - getUseSmartEdit: vi.fn().mockReturnValue(false), getShowModelInfoInChat: vi.fn().mockReturnValue(false), getContinueOnFailedApiCall: vi.fn(), getProjectRoot: vi.fn().mockReturnValue('/test/project/root'), diff --git a/packages/core/src/core/coreToolScheduler.test.ts b/packages/core/src/core/coreToolScheduler.test.ts index a5f340eeeb..1da26dc6a3 100644 --- a/packages/core/src/core/coreToolScheduler.test.ts +++ b/packages/core/src/core/coreToolScheduler.test.ts @@ -255,7 +255,6 @@ function createMockConfig(overrides: Partial = {}): Config { getTruncateToolOutputLines: () => DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES, getToolRegistry: () => defaultToolRegistry, getActiveModel: () => DEFAULT_GEMINI_MODEL, - getUseSmartEdit: () => false, getGeminiClient: () => null, getMessageBus: () => createMockMessageBus(), getEnableHooks: () => false, diff --git a/packages/core/src/core/nonInteractiveToolExecutor.test.ts b/packages/core/src/core/nonInteractiveToolExecutor.test.ts index a4f9524ec7..a903bfdfa1 100644 --- a/packages/core/src/core/nonInteractiveToolExecutor.test.ts +++ b/packages/core/src/core/nonInteractiveToolExecutor.test.ts @@ -63,7 +63,6 @@ describe('executeToolCall', () => { DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD, getTruncateToolOutputLines: () => DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES, getActiveModel: () => PREVIEW_GEMINI_MODEL, - getUseSmartEdit: () => false, getGeminiClient: () => null, // No client needed for these tests getMessageBus: () => null, getPolicyEngine: () => null, diff --git a/packages/core/src/telemetry/clearcut-logger/clearcut-logger.test.ts b/packages/core/src/telemetry/clearcut-logger/clearcut-logger.test.ts index 9a4c811774..c7cc10cdaa 100644 --- a/packages/core/src/telemetry/clearcut-logger/clearcut-logger.test.ts +++ b/packages/core/src/telemetry/clearcut-logger/clearcut-logger.test.ts @@ -316,7 +316,7 @@ describe('ClearcutLogger', () => { it('logs all user settings', () => { const { logger } = setup({ - config: { useSmartEdit: true }, + config: {}, }); vi.stubEnv('TERM_PROGRAM', 'vscode'); diff --git a/packages/core/src/telemetry/loggers.test.ts b/packages/core/src/telemetry/loggers.test.ts index bd0f387bc1..614694097f 100644 --- a/packages/core/src/telemetry/loggers.test.ts +++ b/packages/core/src/telemetry/loggers.test.ts @@ -1748,7 +1748,6 @@ describe('loggers', () => { getSessionId: () => 'test-session-id', getUsageStatisticsEnabled: () => true, getContentGeneratorConfig: () => null, - getUseSmartEdit: () => null, isInteractive: () => false, } as unknown as Config; @@ -1799,7 +1798,6 @@ describe('loggers', () => { getSessionId: () => 'test-session-id', getUsageStatisticsEnabled: () => true, getContentGeneratorConfig: () => null, - getUseSmartEdit: () => null, isInteractive: () => false, } as unknown as Config; @@ -1852,7 +1850,6 @@ describe('loggers', () => { getSessionId: () => 'test-session-id', getUsageStatisticsEnabled: () => true, getContentGeneratorConfig: () => null, - getUseSmartEdit: () => null, isInteractive: () => false, } as unknown as Config; diff --git a/packages/core/src/tools/smart-edit.test.ts b/packages/core/src/tools/smart-edit.test.ts index 7c32c829c1..448662fc6d 100644 --- a/packages/core/src/tools/smart-edit.test.ts +++ b/packages/core/src/tools/smart-edit.test.ts @@ -89,7 +89,6 @@ describe('SmartEditTool', () => { getUsageStatisticsEnabled: vi.fn(() => true), getSessionId: vi.fn(() => 'mock-session-id'), getContentGeneratorConfig: vi.fn(() => ({ authType: 'mock' })), - getUseSmartEdit: vi.fn(() => false), getProxy: vi.fn(() => undefined), getGeminiClient: vi.fn().mockReturnValue(geminiClient), getBaseLlmClient: vi.fn().mockReturnValue(baseLlmClient), diff --git a/schemas/settings.schema.json b/schemas/settings.schema.json index d138c2bcd2..4e556269dd 100644 --- a/schemas/settings.schema.json +++ b/schemas/settings.schema.json @@ -1172,13 +1172,6 @@ }, "additionalProperties": false }, - "useSmartEdit": { - "title": "Use Smart Edit", - "description": "Enable the smart-edit tool instead of the replace tool.", - "markdownDescription": "Enable the smart-edit tool instead of the replace tool.\n\n- Category: `Advanced`\n- Requires restart: `no`\n- Default: `true`", - "default": true, - "type": "boolean" - }, "useWriteTodos": { "title": "Use WriteTodos", "description": "Enable the write_todos tool.",