feat: move shell efficiency guidelines to tool description (#18614)

This commit is contained in:
N. Taylor Mullen
2026-02-09 10:51:13 -08:00
committed by GitHub
parent 469cbca67f
commit aebc107d2c
8 changed files with 147 additions and 91 deletions

View File

@@ -130,6 +130,7 @@ describe('ShellTool', () => {
getGeminiClient: vi.fn().mockReturnValue({}),
getShellToolInactivityTimeout: vi.fn().mockReturnValue(1000),
getEnableInteractiveShell: vi.fn().mockReturnValue(false),
getEnableShellOutputEfficiency: vi.fn().mockReturnValue(true),
sanitizationConfig: {},
} as unknown as Config;
@@ -633,6 +634,15 @@ describe('ShellTool', () => {
const shellTool = new ShellTool(mockConfig, createMockMessageBus());
expect(shellTool.description).toMatchSnapshot();
});
it('should not include efficiency guidelines when disabled', () => {
mockPlatform.mockReturnValue('linux');
vi.mocked(mockConfig.getEnableShellOutputEfficiency).mockReturnValue(
false,
);
const shellTool = new ShellTool(mockConfig, createMockMessageBus());
expect(shellTool.description).not.toContain('Efficiency Guidelines:');
});
});
describe('llmContent output format', () => {