mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 14:10:37 -07:00
Add autoconfigure memory usage setting to the dialog (#18510)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -116,6 +116,12 @@ they appear in the UI.
|
||||
| Folder Trust | `security.folderTrust.enabled` | Setting to track whether Folder trust is enabled. | `true` |
|
||||
| Enable Environment Variable Redaction | `security.environmentVariableRedaction.enabled` | Enable redaction of environment variables that may contain secrets. | `false` |
|
||||
|
||||
### Advanced
|
||||
|
||||
| UI Label | Setting | Description | Default |
|
||||
| --------------------------------- | ------------------------------ | --------------------------------------------- | ------- |
|
||||
| Auto Configure Max Old Space Size | `advanced.autoConfigureMemory` | Automatically configure Node.js memory limits | `false` |
|
||||
|
||||
### Experimental
|
||||
|
||||
| UI Label | Setting | Description | Default |
|
||||
|
||||
@@ -224,7 +224,7 @@ describe('SettingsSchema', () => {
|
||||
expect(
|
||||
getSettingsSchema().advanced.properties.autoConfigureMemory
|
||||
.showInDialog,
|
||||
).toBe(false);
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it('should infer Settings type correctly', () => {
|
||||
|
||||
@@ -1413,7 +1413,7 @@ const SETTINGS_SCHEMA = {
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
description: 'Automatically configure Node.js memory limits',
|
||||
showInDialog: false,
|
||||
showInDialog: true,
|
||||
},
|
||||
dnsResolutionOrder: {
|
||||
type: 'string',
|
||||
|
||||
@@ -85,6 +85,17 @@ describe('SettingsUtils', () => {
|
||||
default: {},
|
||||
description: 'Advanced settings for power users.',
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
autoConfigureMemory: {
|
||||
type: 'boolean',
|
||||
label: 'Auto Configure Max Old Space Size',
|
||||
category: 'Advanced',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
description: 'Automatically configure Node.js memory limits',
|
||||
showInDialog: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
ui: {
|
||||
type: 'object',
|
||||
@@ -395,11 +406,15 @@ describe('SettingsUtils', () => {
|
||||
expect(uiKeys).not.toContain('ui.theme'); // This is now marked false
|
||||
});
|
||||
|
||||
it('should not include Advanced category settings', () => {
|
||||
it('should include Advanced category settings', () => {
|
||||
const categories = getDialogSettingsByCategory();
|
||||
|
||||
// Advanced settings should be filtered out
|
||||
expect(categories['Advanced']).toBeUndefined();
|
||||
// Advanced settings should now be included because of autoConfigureMemory
|
||||
expect(categories['Advanced']).toBeDefined();
|
||||
const advancedSettings = categories['Advanced'];
|
||||
expect(advancedSettings.map((s) => s.key)).toContain(
|
||||
'advanced.autoConfigureMemory',
|
||||
);
|
||||
});
|
||||
|
||||
it('should include settings with showInDialog=true', () => {
|
||||
|
||||
Reference in New Issue
Block a user