mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
fix(settings): use union merge for excludeTools (#7842)
This commit is contained in:
@@ -428,8 +428,11 @@ describe('Settings Loading and Merging', () => {
|
|||||||
'/workspace/dir',
|
'/workspace/dir',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Verify excludeTools are overwritten by workspace
|
// Verify excludeTools are concatenated and de-duped
|
||||||
expect(settings.merged.tools?.exclude).toEqual(['workspace-tool']);
|
expect(settings.merged.tools?.exclude).toEqual([
|
||||||
|
'user-tool',
|
||||||
|
'workspace-tool',
|
||||||
|
]);
|
||||||
|
|
||||||
// Verify excludedProjectEnvVars are concatenated and de-duped
|
// Verify excludedProjectEnvVars are concatenated and de-duped
|
||||||
expect(settings.merged.advanced?.excludedEnvVars).toEqual(
|
expect(settings.merged.advanced?.excludedEnvVars).toEqual(
|
||||||
|
|||||||
@@ -662,6 +662,7 @@ const SETTINGS_SCHEMA = {
|
|||||||
default: undefined as string[] | undefined,
|
default: undefined as string[] | undefined,
|
||||||
description: 'Tool names to exclude from discovery.',
|
description: 'Tool names to exclude from discovery.',
|
||||||
showInDialog: false,
|
showInDialog: false,
|
||||||
|
mergeStrategy: MergeStrategy.UNION,
|
||||||
},
|
},
|
||||||
discoveryCommand: {
|
discoveryCommand: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
|||||||
Reference in New Issue
Block a user