chore: cleanup old smart edit settings (#15832)

This commit is contained in:
Abhi
2026-01-02 17:28:28 -05:00
committed by GitHub
parent 764b195977
commit c0ccb22460
14 changed files with 2 additions and 48 deletions
+1 -13
View File
@@ -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);
-1
View File
@@ -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'),
@@ -255,7 +255,6 @@ function createMockConfig(overrides: Partial<Config> = {}): Config {
getTruncateToolOutputLines: () => DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES,
getToolRegistry: () => defaultToolRegistry,
getActiveModel: () => DEFAULT_GEMINI_MODEL,
getUseSmartEdit: () => false,
getGeminiClient: () => null,
getMessageBus: () => createMockMessageBus(),
getEnableHooks: () => false,
@@ -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,
@@ -316,7 +316,7 @@ describe('ClearcutLogger', () => {
it('logs all user settings', () => {
const { logger } = setup({
config: { useSmartEdit: true },
config: {},
});
vi.stubEnv('TERM_PROGRAM', 'vscode');
@@ -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;
@@ -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),