refactor: consolidate EditTool and SmartEditTool (#15857)

This commit is contained in:
Abhi
2026-01-04 23:52:14 -05:00
committed by GitHub
parent d3563e2f0e
commit f3625aab13
9 changed files with 139 additions and 1851 deletions
+4 -4
View File
@@ -12,7 +12,7 @@ import type {
} from '../index.js';
import {
AuthType,
EditTool,
SmartEditTool,
GeminiClient,
ToolConfirmationOutcome,
ToolErrorType,
@@ -1034,7 +1034,7 @@ describe('loggers', () => {
});
it('should log a tool call with all fields', () => {
const tool = new EditTool(mockConfig, createMockMessageBus());
const tool = new SmartEditTool(mockConfig, createMockMessageBus());
const call: CompletedToolCall = {
status: 'success',
request: {
@@ -1250,7 +1250,7 @@ describe('loggers', () => {
contentLength: 13,
},
outcome: ToolConfirmationOutcome.ModifyWithEditor,
tool: new EditTool(mockConfig, createMockMessageBus()),
tool: new SmartEditTool(mockConfig, createMockMessageBus()),
invocation: {} as AnyToolInvocation,
durationMs: 100,
};
@@ -1329,7 +1329,7 @@ describe('loggers', () => {
errorType: undefined,
contentLength: 13,
},
tool: new EditTool(mockConfig, createMockMessageBus()),
tool: new SmartEditTool(mockConfig, createMockMessageBus()),
invocation: {} as AnyToolInvocation,
durationMs: 100,
};