Skip to content

Commit e290a61

Browse files
ali-aljufairijacob314NTaylorMullen
authored
fix(settings) : Disable showing statics in the dialog (google-gemini#5998)
Co-authored-by: Jacob Richman <jacob314@gmail.com> Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
1 parent 92bb462 commit e290a61

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

packages/cli/src/config/settingsSchema.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ describe('SettingsSchema', () => {
187187
expect(SETTINGS_SCHEMA.hideWindowTitle.showInDialog).toBe(true);
188188
expect(SETTINGS_SCHEMA.hideTips.showInDialog).toBe(true);
189189
expect(SETTINGS_SCHEMA.hideBanner.showInDialog).toBe(true);
190-
expect(SETTINGS_SCHEMA.usageStatisticsEnabled.showInDialog).toBe(true);
190+
expect(SETTINGS_SCHEMA.usageStatisticsEnabled.showInDialog).toBe(false);
191191

192192
// Check that advanced settings are hidden from dialog
193193
expect(SETTINGS_SCHEMA.selectedAuthType.showInDialog).toBe(false);

packages/cli/src/config/settingsSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const SETTINGS_SCHEMA = {
103103
requiresRestart: true,
104104
default: true,
105105
description: 'Enable collection of usage statistics',
106-
showInDialog: true,
106+
showInDialog: false, // All details are shown in /privacy and dependent on auth type
107107
},
108108
autoConfigureMaxOldSpaceSize: {
109109
type: 'boolean',

packages/cli/src/utils/settingsUtils.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ describe('SettingsUtils', () => {
239239
expect(shouldShowInDialog('showMemoryUsage')).toBe(true);
240240
expect(shouldShowInDialog('vimMode')).toBe(true);
241241
expect(shouldShowInDialog('hideWindowTitle')).toBe(true);
242-
expect(shouldShowInDialog('usageStatisticsEnabled')).toBe(true);
242+
expect(shouldShowInDialog('usageStatisticsEnabled')).toBe(false);
243243
});
244244

245245
it('should return false for settings marked to hide from dialog', () => {
@@ -286,7 +286,7 @@ describe('SettingsUtils', () => {
286286
expect(allKeys).toContain('ideMode');
287287
expect(allKeys).toContain('disableAutoUpdate');
288288
expect(allKeys).toContain('showMemoryUsage');
289-
expect(allKeys).toContain('usageStatisticsEnabled');
289+
expect(allKeys).not.toContain('usageStatisticsEnabled');
290290
expect(allKeys).not.toContain('selectedAuthType');
291291
expect(allKeys).not.toContain('coreTools');
292292
expect(allKeys).not.toContain('theme'); // Now hidden
@@ -302,7 +302,7 @@ describe('SettingsUtils', () => {
302302
expect(keys).toContain('showMemoryUsage');
303303
expect(keys).toContain('vimMode');
304304
expect(keys).toContain('hideWindowTitle');
305-
expect(keys).toContain('usageStatisticsEnabled');
305+
expect(keys).not.toContain('usageStatisticsEnabled');
306306
expect(keys).not.toContain('selectedAuthType'); // Advanced setting
307307
expect(keys).not.toContain('useExternalAuth'); // Advanced setting
308308
});
@@ -329,7 +329,7 @@ describe('SettingsUtils', () => {
329329
expect(dialogKeys).toContain('showMemoryUsage');
330330
expect(dialogKeys).toContain('vimMode');
331331
expect(dialogKeys).toContain('hideWindowTitle');
332-
expect(dialogKeys).toContain('usageStatisticsEnabled');
332+
expect(dialogKeys).not.toContain('usageStatisticsEnabled');
333333
expect(dialogKeys).toContain('ideMode');
334334
expect(dialogKeys).toContain('disableAutoUpdate');
335335

0 commit comments

Comments
 (0)