From b695467f943ce08405e39d31451eacd5c4249f0c Mon Sep 17 00:00:00 2001 From: mkorwel Date: Sat, 18 Apr 2026 01:54:45 +0000 Subject: [PATCH] test: fix ToolConfirmationFullFrame snapshot --- .../src/ui/ToolConfirmationFullFrame.test.tsx | 3 + ...-the-frame-of-the-entire-terminal.snap.svg | 89 +++++++++++-------- .../ToolConfirmationFullFrame.test.tsx.snap | 72 +++++++++------ 3 files changed, 97 insertions(+), 67 deletions(-) diff --git a/packages/cli/src/ui/ToolConfirmationFullFrame.test.tsx b/packages/cli/src/ui/ToolConfirmationFullFrame.test.tsx index dbb2a34350..c7f77a17eb 100644 --- a/packages/cli/src/ui/ToolConfirmationFullFrame.test.tsx +++ b/packages/cli/src/ui/ToolConfirmationFullFrame.test.tsx @@ -44,6 +44,9 @@ vi.mock('./hooks/useSettingsCommand.js'); vi.mock('./hooks/useModelCommand.js'); vi.mock('./hooks/slashCommandProcessor.js'); vi.mock('./hooks/useConsoleMessages.js'); +vi.mock('./hooks/useBanner.js', () => ({ + useBanner: vi.fn(() => ({ bannerText: '' })), +})); vi.mock('./hooks/useTerminalSize.js', () => ({ useTerminalSize: vi.fn(() => ({ columns: 100, rows: 30 })), })); diff --git a/packages/cli/src/ui/__snapshots__/ToolConfirmationFullFrame-Full-Terminal-Tool-Confirmation-Snapshot-renders-tool-confirmation-box-in-the-frame-of-the-entire-terminal.snap.svg b/packages/cli/src/ui/__snapshots__/ToolConfirmationFullFrame-Full-Terminal-Tool-Confirmation-Snapshot-renders-tool-confirmation-box-in-the-frame-of-the-entire-terminal.snap.svg index d9e6180fad..7c948f6dba 100644 --- a/packages/cli/src/ui/__snapshots__/ToolConfirmationFullFrame-Full-Terminal-Tool-Confirmation-Snapshot-renders-tool-confirmation-box-in-the-frame-of-the-entire-terminal.snap.svg +++ b/packages/cli/src/ui/__snapshots__/ToolConfirmationFullFrame-Full-Terminal-Tool-Confirmation-Snapshot-renders-tool-confirmation-box-in-the-frame-of-the-entire-terminal.snap.svg @@ -1,45 +1,56 @@ - + - + - > Can you edit InputPrompt.tsx for me? - ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ - ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ - │ ? Edit packages/.../InputPrompt.tsx: return kittyProtocolSupporte... => return kittyProto… │ - │ ╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │ - │ │ ... first 42 lines hidden (Ctrl+O to show) ... │ │ - │ │ 43 const line43 = true; │ │ - │ │ 44 const line44 = true; │ │ - │ │ 45 const line45 = true; │ │ - │ │ 46 const line46 = true; │ │ - │ │ 47 const line47 = true; │ │▄ - │ │ 48 const line48 = true; │ │█ - │ │ 49 const line49 = true; │ │█ - │ │ 50 const line50 = true; │ │█ - │ │ 51 const line51 = true; │ │█ - │ │ 52 const line52 = true; │ │█ - │ │ 53 const line53 = true; │ │█ - │ │ 54 const line54 = true; │ │█ - │ │ 55 const line55 = true; │ │█ - │ │ 56 const line56 = true; │ │█ - │ │ 57 const line57 = true; │ │█ - │ │ 58 const line58 = true; │ │█ - │ │ 59 const line59 = true; │ │█ - │ │ 60 const line60 = true; │ │█ - │ │ 61 - return kittyProtocolSupporte...; │ │█ - │ │ 61 + return kittyProtocolSupporte...; │ │█ - │ │ 62 buffer: TextBuffer; │ │█ - │ │ 63 onSubmit: (value: string) => void; │ │█ - │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ │█ - │ Apply this change? │█ - │ │█ - │ ● 1. Allow once │█ - │ 2. Allow for this session │█ - │ 3. Allow for this file in all future sessions ~/.gemini/policies/auto-saved.toml │█ - │ 4. Modify with external editor │█ - │ 5. No, suggest changes (esc) │█ - ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯█ + ▝▜▄ ▗█▀▀▜▙▝█▛▀▀▌▜██▖▟██▘▜█▘▜██▖▝█▛▝█▛ + ▝▜▄ █▌ █▙▟ ▐█▝█▛▐█ ▐█ ▐█▝█▖█▌ █▌ + ▗▟▀ ▜▙ ▝█▛ █▌▝ ▖▐█ ▐█ ▐█ ▐█ ▝██▌ █▌ + ▝▀ ▀▀▀▀▘▝▀▀▀▀▘▀▀▘ ▀▀▘▀▀▘▀▀▘ ▝▀▀▝▀▀ + Gemini CLI v1.2.3 + Tips for getting started: + 1. Create GEMINI.md files to customize your interactions + 2. /help for more information + 3. Ask coding questions, edit code or run commands + 4. Be specific for the best results + ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ + > Can you edit InputPrompt.tsx for me? + ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ + ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ + │ ? Edit packages/.../InputPrompt.tsx: return kittyProtocolSupporte... => return kittyProto… │ + │ ╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │ + │ │ ... first 42 lines hidden (Ctrl+O to show) ... │ │ + │ │ 43 const line43 = true; │ │ + │ │ 44 const line44 = true; │ │ + │ │ 45 const line45 = true; │ │ + │ │ 46 const line46 = true; │ │ + │ │ 47 const line47 = true; │ │ + │ │ 48 const line48 = true; │ │ + │ │ 49 const line49 = true; │ │ + │ │ 50 const line50 = true; │ │ + │ │ 51 const line51 = true; │ │ + │ │ 52 const line52 = true; │ │ + │ │ 53 const line53 = true; │ │ + │ │ 54 const line54 = true; │ │ + │ │ 55 const line55 = true; │ │ + │ │ 56 const line56 = true; │ │ + │ │ 57 const line57 = true; │ │ + │ │ 58 const line58 = true; │ │ + │ │ 59 const line59 = true; │ │ + │ │ 60 const line60 = true; │ │ + │ │ 61 - return kittyProtocolSupporte...; │ │ + │ │ 61 + return kittyProtocolSupporte...; │ │ + │ │ 62 buffer: TextBuffer; │ │ + │ │ 63 onSubmit: (value: string) => void; │ │ + │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ │ + │ Apply this change? │ + │ │ + │ ● 1. Allow once │ + │ 2. Allow for this session │ + │ 3. Allow for this file in all future sessions ~/.gemini/policies/auto-saved.toml │ + │ 4. Modify with external editor │ + │ 5. No, suggest changes (esc) │ + ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ \ No newline at end of file diff --git a/packages/cli/src/ui/__snapshots__/ToolConfirmationFullFrame.test.tsx.snap b/packages/cli/src/ui/__snapshots__/ToolConfirmationFullFrame.test.tsx.snap index 4d9215e60e..d7fbc8a298 100644 --- a/packages/cli/src/ui/__snapshots__/ToolConfirmationFullFrame.test.tsx.snap +++ b/packages/cli/src/ui/__snapshots__/ToolConfirmationFullFrame.test.tsx.snap @@ -1,7 +1,23 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Full Terminal Tool Confirmation Snapshot > renders tool confirmation box in the frame of the entire terminal 1`] = ` -" > Can you edit InputPrompt.tsx for me? +" + ▝▜▄ ▗█▀▀▜▙▝█▛▀▀▌▜██▖▟██▘▜█▘▜██▖▝█▛▝█▛ + ▝▜▄ █▌ █▙▟ ▐█▝█▛▐█ ▐█ ▐█▝█▖█▌ █▌ + ▗▟▀ ▜▙ ▝█▛ █▌▝ ▖▐█ ▐█ ▐█ ▐█ ▝██▌ █▌ + ▝▀ ▀▀▀▀▘▝▀▀▀▀▘▀▀▘ ▀▀▘▀▀▘▀▀▘ ▝▀▀▝▀▀ + + Gemini CLI v1.2.3 + + + +Tips for getting started: +1. Create GEMINI.md files to customize your interactions +2. /help for more information +3. Ask coding questions, edit code or run commands +4. Be specific for the best results +▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ + > Can you edit InputPrompt.tsx for me? ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ @@ -12,32 +28,32 @@ exports[`Full Terminal Tool Confirmation Snapshot > renders tool confirmation bo │ │ 44 const line44 = true; │ │ │ │ 45 const line45 = true; │ │ │ │ 46 const line46 = true; │ │ -│ │ 47 const line47 = true; │ │▄ -│ │ 48 const line48 = true; │ │█ -│ │ 49 const line49 = true; │ │█ -│ │ 50 const line50 = true; │ │█ -│ │ 51 const line51 = true; │ │█ -│ │ 52 const line52 = true; │ │█ -│ │ 53 const line53 = true; │ │█ -│ │ 54 const line54 = true; │ │█ -│ │ 55 const line55 = true; │ │█ -│ │ 56 const line56 = true; │ │█ -│ │ 57 const line57 = true; │ │█ -│ │ 58 const line58 = true; │ │█ -│ │ 59 const line59 = true; │ │█ -│ │ 60 const line60 = true; │ │█ -│ │ 61 - return kittyProtocolSupporte...; │ │█ -│ │ 61 + return kittyProtocolSupporte...; │ │█ -│ │ 62 buffer: TextBuffer; │ │█ -│ │ 63 onSubmit: (value: string) => void; │ │█ -│ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ │█ -│ Apply this change? │█ -│ │█ -│ ● 1. Allow once │█ -│ 2. Allow for this session │█ -│ 3. Allow for this file in all future sessions ~/.gemini/policies/auto-saved.toml │█ -│ 4. Modify with external editor │█ -│ 5. No, suggest changes (esc) │█ -╰─────────────────────────────────────────────────────────────────────────────────────────────────╯█ +│ │ 47 const line47 = true; │ │ +│ │ 48 const line48 = true; │ │ +│ │ 49 const line49 = true; │ │ +│ │ 50 const line50 = true; │ │ +│ │ 51 const line51 = true; │ │ +│ │ 52 const line52 = true; │ │ +│ │ 53 const line53 = true; │ │ +│ │ 54 const line54 = true; │ │ +│ │ 55 const line55 = true; │ │ +│ │ 56 const line56 = true; │ │ +│ │ 57 const line57 = true; │ │ +│ │ 58 const line58 = true; │ │ +│ │ 59 const line59 = true; │ │ +│ │ 60 const line60 = true; │ │ +│ │ 61 - return kittyProtocolSupporte...; │ │ +│ │ 61 + return kittyProtocolSupporte...; │ │ +│ │ 62 buffer: TextBuffer; │ │ +│ │ 63 onSubmit: (value: string) => void; │ │ +│ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ │ +│ Apply this change? │ +│ │ +│ ● 1. Allow once │ +│ 2. Allow for this session │ +│ 3. Allow for this file in all future sessions ~/.gemini/policies/auto-saved.toml │ +│ 4. Modify with external editor │ +│ 5. No, suggest changes (esc) │ +╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ " `;