mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-17 17:41:24 -07:00
feat(shell): enable interactive commands with virtual terminal (#6694)
This commit is contained in:
@@ -133,6 +133,37 @@ describe('SettingsUtils', () => {
|
||||
},
|
||||
},
|
||||
},
|
||||
tools: {
|
||||
type: 'object',
|
||||
label: 'Tools',
|
||||
category: 'Tools',
|
||||
requiresRestart: false,
|
||||
default: {},
|
||||
description: 'Tool settings.',
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
shell: {
|
||||
type: 'object',
|
||||
label: 'Shell',
|
||||
category: 'Tools',
|
||||
requiresRestart: false,
|
||||
default: {},
|
||||
description: 'Shell tool settings.',
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
pager: {
|
||||
type: 'string',
|
||||
label: 'Pager',
|
||||
category: 'Tools',
|
||||
requiresRestart: false,
|
||||
default: 'less',
|
||||
description: 'The pager to use for long output.',
|
||||
showInDialog: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const satisfies SettingsSchema;
|
||||
|
||||
vi.mocked(getSettingsSchema).mockReturnValue(
|
||||
@@ -405,8 +436,13 @@ describe('SettingsUtils', () => {
|
||||
expect(keys).not.toContain('general.preferredEditor'); // Now marked false
|
||||
expect(keys).not.toContain('security.auth.selectedType'); // Advanced setting
|
||||
|
||||
// Most string settings are now hidden, so let's just check they exclude advanced ones
|
||||
expect(keys.every((key) => !key.startsWith('tool'))).toBe(true); // No tool-related settings
|
||||
// Check that user-facing tool settings are included
|
||||
expect(keys).toContain('tools.shell.pager');
|
||||
|
||||
// Check that advanced/hidden tool settings are excluded
|
||||
expect(keys).not.toContain('tools.discoveryCommand');
|
||||
expect(keys).not.toContain('tools.callCommand');
|
||||
expect(keys.every((key) => !key.startsWith('advanced.'))).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user