fix: address PR review feedback and test snapshots

This commit is contained in:
Spencer
2026-03-20 13:22:11 +00:00
parent b903b00e9d
commit 1a722ead96
2 changed files with 46 additions and 5 deletions
@@ -6,12 +6,11 @@
import { describe, it, expect, beforeAll, vi } from 'vitest';
import { ToolConfirmationMessage } from './ToolConfirmationMessage.js';
import {
type SerializableConfirmationDetails,
type Config,
initializeShellParsers,
import type {
SerializableConfirmationDetails,
Config,
} from '@google/gemini-cli-core';
import { initializeShellParsers } from '@google/gemini-cli-core';
import { renderWithProviders } from '../../../test-utils/render.js';
describe('ToolConfirmationMessage Redirection', () => {
@@ -1,5 +1,47 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`ToolConfirmationMessage > Auto-approve checkbox for exec tools > hides permanent approval option for 'edit commands in DEFAULT mode' 1`] = `
"mkdir test
Allow execution of: 'mkdir'?
● 1. Allow once
2. Allow for this session
3. No, suggest changes (esc)
"
`;
exports[`ToolConfirmationMessage > Auto-approve checkbox for exec tools > hides permanent approval option for 'unsafe commands' 1`] = `
"rm -rf /
Allow execution of: 'rm'?
● 1. Allow once
2. Allow for this session
3. No, suggest changes (esc)
"
`;
exports[`ToolConfirmationMessage > Auto-approve checkbox for exec tools > shows permanent approval option for 'edit commands in AUTO_EDIT mode' 1`] = `
"mkdir test
Allow execution of: 'mkdir'?
● 1. Allow once
2. Allow for this session
3. Allow this command for all future sessions
4. No, suggest changes (esc)
"
`;
exports[`ToolConfirmationMessage > Auto-approve checkbox for exec tools > shows permanent approval option for 'safe commands' 1`] = `
"ls -la
Allow execution of: 'ls'?
● 1. Allow once
2. Allow for this session
3. Allow this command for all future sessions
4. No, suggest changes (esc)
"
`;
exports[`ToolConfirmationMessage > enablePermanentToolApproval setting > should show "Allow for all future sessions" when trusted 1`] = `
"╭──────────────────────────────────────────────────────────────────────────────╮
│ │