chore: fix tests and update documentation after merge

This commit is contained in:
mkorwel
2026-02-19 23:15:08 -06:00
parent c7367f485a
commit 173cb56643
8 changed files with 81 additions and 72 deletions
@@ -20,7 +20,8 @@ async function run(cmd) {
stdio: ['pipe', 'pipe', 'ignore'],
});
return stdout.trim();
} catch (_e) { // eslint-disable-line @typescript-eslint/no-unused-vars
} catch (_e) {
// eslint-disable-line @typescript-eslint/no-unused-vars
return null;
}
}
+1
View File
@@ -30,6 +30,7 @@ they appear in the UI.
| Enable Notifications | `general.enableNotifications` | Enable run-event notifications for action-required prompts and session completion. Currently macOS only. | `false` |
| Plan Directory | `general.plan.directory` | The directory where planning artifacts are stored. If not specified, defaults to the system temporary directory. | `undefined` |
| Enable Prompt Completion | `general.enablePromptCompletion` | Enable AI-powered prompt completion suggestions while typing. | `false` |
| Tool Preselection | `general.toolPreselection` | Exclude unneeded tools from context to save tokens and improve performance. | `true` |
| Debug Keystroke Logging | `general.debugKeystrokeLogging` | Enable debug logging of keystrokes to the console. | `false` |
| Enable Session Cleanup | `general.sessionRetention.enabled` | Enable automatic session cleanup | `false` |
| Keep chat history | `general.sessionRetention.maxAge` | Automatically delete chats older than this time period (e.g., "30d", "7d", "24h", "1w") | `undefined` |
+5
View File
@@ -148,6 +148,11 @@ their corresponding top-level category object in your `settings.json` file.
request" errors.
- **Default:** `false`
- **`general.toolPreselection`** (boolean):
- **Description:** Exclude unneeded tools from context to save tokens and
improve performance.
- **Default:** `true`
- **`general.debugKeystrokeLogging`** (boolean):
- **Description:** Enable debug logging of keystrokes to the console.
- **Default:** `false`
+4 -4
View File
@@ -58,8 +58,8 @@ describe('AppRig', () => {
// Resolve and finish. Also removes read_file breakpoint.
await rig.resolveTool('read_file');
await rig.waitForOutput('Task complete.', 100000);
});
await rig.waitForOutput('Task complete.', 120000);
}, 120000);
it('should render the app and handle a simple message', async () => {
const fakeResponsesPath = path.join(
@@ -83,6 +83,6 @@ describe('AppRig', () => {
await rig.pressEnter();
// Wait for model response
await rig.waitForOutput('Hello! How can I help you today?');
});
await rig.waitForOutput('Hello! How can I help you today?', 30000);
}, 30000);
});
+20 -31
View File
@@ -139,6 +139,7 @@ export class AppRig {
approvalMode,
policyEngineConfig,
enableEventDrivenScheduler: true,
toolPreselection: false,
extensionLoader: new MockExtensionManager(),
excludeTools: this.options.configOverrides?.excludeTools,
...this.options.configOverrides,
@@ -178,41 +179,29 @@ export class AppRig {
}
private createRigSettings(): LoadedSettings {
const userSettings = {
security: {
auth: {
selectedType: AuthType.USE_GEMINI,
useExternal: true,
},
folderTrust: {
enabled: true,
},
},
ide: {
enabled: false,
hasSeenNudge: true,
},
};
return createMockSettings({
user: {
path: path.join(this.testDir, '.gemini', 'user_settings.json'),
settings: {
security: {
auth: {
selectedType: AuthType.USE_GEMINI,
useExternal: true,
},
folderTrust: {
enabled: true,
},
},
ide: {
enabled: false,
hasSeenNudge: true,
},
},
originalSettings: {},
},
merged: {
security: {
auth: {
selectedType: AuthType.USE_GEMINI,
useExternal: true,
},
folderTrust: {
enabled: true,
},
},
ide: {
enabled: false,
hasSeenNudge: true,
},
settings: userSettings,
originalSettings: structuredClone(userSettings),
},
merged: userSettings,
});
}
+21 -9
View File
@@ -52,17 +52,29 @@ export const createMockSettings = (
const loaded = new LoadedSettings(
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
(system as any) || { path: '', settings: {}, originalSettings: {} },
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
(systemDefaults as any) || { path: '', settings: {}, originalSettings: {} },
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
(user as any) || {
path: '',
settings: settingsOverrides,
originalSettings: settingsOverrides,
(system as any) || {
path: '/tmp/gemini_system_settings.json',
settings: {},
originalSettings: {},
},
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
(workspace as any) || { path: '', settings: {}, originalSettings: {} },
(systemDefaults as any) || {
path: '/tmp/gemini_system_defaults.json',
settings: {},
originalSettings: {},
},
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
(user as any) || {
path: '/tmp/gemini_user_settings.json',
settings: settingsOverrides,
originalSettings: structuredClone(settingsOverrides),
},
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
(workspace as any) || {
path: '/tmp/gemini_workspace_settings.json',
settings: {},
originalSettings: {},
},
isTrusted ?? true,
errors || [],
);
@@ -28,12 +28,12 @@ exports[`SettingsDialog > Initial Rendering > should render settings list with v
│ Enable Prompt Completion false │
│ Enable AI-powered prompt completion suggestions while typing. │
│ │
│ Tool Preselection true │
│ Exclude unneeded tools from context to save tokens and improve performance. │
│ │
│ Debug Keystroke Logging false │
│ Enable debug logging of keystrokes to the console. │
│ │
│ Enable Session Cleanup false │
│ Enable automatic session cleanup │
│ │
│ ▼ │
│ │
│ Apply To │
@@ -75,12 +75,12 @@ exports[`SettingsDialog > Snapshot Tests > should render 'accessibility settings
│ Enable Prompt Completion false │
│ Enable AI-powered prompt completion suggestions while typing. │
│ │
│ Tool Preselection true │
│ Exclude unneeded tools from context to save tokens and improve performance. │
│ │
│ Debug Keystroke Logging false │
│ Enable debug logging of keystrokes to the console. │
│ │
│ Enable Session Cleanup false │
│ Enable automatic session cleanup │
│ │
│ ▼ │
│ │
│ Apply To │
@@ -122,12 +122,12 @@ exports[`SettingsDialog > Snapshot Tests > should render 'all boolean settings d
│ Enable Prompt Completion false* │
│ Enable AI-powered prompt completion suggestions while typing. │
│ │
│ Tool Preselection true │
│ Exclude unneeded tools from context to save tokens and improve performance. │
│ │
│ Debug Keystroke Logging false* │
│ Enable debug logging of keystrokes to the console. │
│ │
│ Enable Session Cleanup false │
│ Enable automatic session cleanup │
│ │
│ ▼ │
│ │
│ Apply To │
@@ -169,12 +169,12 @@ exports[`SettingsDialog > Snapshot Tests > should render 'default state' correct
│ Enable Prompt Completion false │
│ Enable AI-powered prompt completion suggestions while typing. │
│ │
│ Tool Preselection true │
│ Exclude unneeded tools from context to save tokens and improve performance. │
│ │
│ Debug Keystroke Logging false │
│ Enable debug logging of keystrokes to the console. │
│ │
│ Enable Session Cleanup false │
│ Enable automatic session cleanup │
│ │
│ ▼ │
│ │
│ Apply To │
@@ -216,12 +216,12 @@ exports[`SettingsDialog > Snapshot Tests > should render 'file filtering setting
│ Enable Prompt Completion false │
│ Enable AI-powered prompt completion suggestions while typing. │
│ │
│ Tool Preselection true │
│ Exclude unneeded tools from context to save tokens and improve performance. │
│ │
│ Debug Keystroke Logging false │
│ Enable debug logging of keystrokes to the console. │
│ │
│ Enable Session Cleanup false │
│ Enable automatic session cleanup │
│ │
│ ▼ │
│ │
│ Apply To │
@@ -263,12 +263,12 @@ exports[`SettingsDialog > Snapshot Tests > should render 'focused on scope selec
│ Enable Prompt Completion false │
│ Enable AI-powered prompt completion suggestions while typing. │
│ │
│ Tool Preselection true │
│ Exclude unneeded tools from context to save tokens and improve performance. │
│ │
│ Debug Keystroke Logging false │
│ Enable debug logging of keystrokes to the console. │
│ │
│ Enable Session Cleanup false │
│ Enable automatic session cleanup │
│ │
│ ▼ │
│ │
│ > Apply To │
@@ -310,12 +310,12 @@ exports[`SettingsDialog > Snapshot Tests > should render 'mixed boolean and numb
│ Enable Prompt Completion false │
│ Enable AI-powered prompt completion suggestions while typing. │
│ │
│ Tool Preselection true │
│ Exclude unneeded tools from context to save tokens and improve performance. │
│ │
│ Debug Keystroke Logging false │
│ Enable debug logging of keystrokes to the console. │
│ │
│ Enable Session Cleanup false │
│ Enable automatic session cleanup │
│ │
│ ▼ │
│ │
│ Apply To │
@@ -357,12 +357,12 @@ exports[`SettingsDialog > Snapshot Tests > should render 'tools and security set
│ Enable Prompt Completion false │
│ Enable AI-powered prompt completion suggestions while typing. │
│ │
│ Tool Preselection true │
│ Exclude unneeded tools from context to save tokens and improve performance. │
│ │
│ Debug Keystroke Logging false │
│ Enable debug logging of keystrokes to the console. │
│ │
│ Enable Session Cleanup false │
│ Enable automatic session cleanup │
│ │
│ ▼ │
│ │
│ Apply To │
@@ -404,12 +404,12 @@ exports[`SettingsDialog > Snapshot Tests > should render 'various boolean settin
│ Enable Prompt Completion true* │
│ Enable AI-powered prompt completion suggestions while typing. │
│ │
│ Tool Preselection true │
│ Exclude unneeded tools from context to save tokens and improve performance. │
│ │
│ Debug Keystroke Logging true* │
│ Enable debug logging of keystrokes to the console. │
│ │
│ Enable Session Cleanup false │
│ Enable automatic session cleanup │
│ │
│ ▼ │
│ │
│ Apply To │
+1
View File
@@ -216,6 +216,7 @@ describe('Gemini Client (client.ts)', () => {
isJitContextEnabled: vi.fn().mockReturnValue(false),
getToolOutputMaskingEnabled: vi.fn().mockReturnValue(false),
getDisableLoopDetection: vi.fn().mockReturnValue(false),
isToolPreselectionEnabled: vi.fn().mockReturnValue(false),
getSessionId: vi.fn().mockReturnValue('test-session-id'),
getProxy: vi.fn().mockReturnValue(undefined),