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:
Jacob Richman
2026-02-10 15:24:08 -08:00
committed by GitHub
parent cb4e1e684d
commit be2ebd1772
4 changed files with 26 additions and 5 deletions

View File

@@ -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 |

View File

@@ -224,7 +224,7 @@ describe('SettingsSchema', () => {
expect(
getSettingsSchema().advanced.properties.autoConfigureMemory
.showInDialog,
).toBe(false);
).toBe(true);
});
it('should infer Settings type correctly', () => {

View File

@@ -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',

View File

@@ -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', () => {