From b0ce5bb8e7a1a9e22e5f6fc7c8b4c76a2d3fa003 Mon Sep 17 00:00:00 2001 From: "A.K.M. Adib" Date: Fri, 24 Apr 2026 16:01:34 -0400 Subject: [PATCH] plz work --- .../src/ui/__snapshots__/App.test.tsx.snap | 4 +- ...security-warning-height-correctly.snap.svg | 68 +- ...-and-content-for-large-edit-diffs.snap.svg | 611 ++++++++-------- ...d-content-for-large-exec-commands.snap.svg | 96 +-- .../ToolConfirmationQueue.test.tsx.snap | 31 +- .../RedirectionConfirmation.test.tsx.snap | 5 +- ...lable-height-for-large-edit-diffs.snap.svg | 678 +++++++++--------- ...le-height-for-large-exec-commands.snap.svg | 97 ++- ...-newlines-and-syntax-highlighting.snap.svg | 11 +- .../ToolConfirmationMessage.test.tsx.snap | 65 +- 10 files changed, 827 insertions(+), 839 deletions(-) diff --git a/packages/cli/src/ui/__snapshots__/App.test.tsx.snap b/packages/cli/src/ui/__snapshots__/App.test.tsx.snap index 611f2e0908..b2a3588c71 100644 --- a/packages/cli/src/ui/__snapshots__/App.test.tsx.snap +++ b/packages/cli/src/ui/__snapshots__/App.test.tsx.snap @@ -137,14 +137,14 @@ HistoryItemDisplay │ │ │ ● 1. Allow once │ │ 2. Allow for this session │ -│ 3. No, suggest changes (esc) │ +│ 3. Allow this command for all future sessions ~/.gemini/policies/auto-saved.toml │ +│ 4. No, suggest changes (esc) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ - Notifications Composer diff --git a/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue-ToolConfirmationQueue-height-allocation-and-layout-should-handle-security-warning-height-correctly.snap.svg b/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue-ToolConfirmationQueue-height-allocation-and-layout-should-handle-security-warning-height-correctly.snap.svg index 8e57fe107e..14387bbf1f 100644 --- a/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue-ToolConfirmationQueue-height-allocation-and-layout-should-handle-security-warning-height-correctly.snap.svg +++ b/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue-ToolConfirmationQueue-height-allocation-and-layout-should-handle-security-warning-height-correctly.snap.svg @@ -16,96 +16,96 @@ echo - "Line 44" + "Line 45" echo - "Line 45" + "Line 46" echo - "Line 46" + "Line 47" echo - "Line 47" + "Line 48" echo - "Line 48" + "Line 49" echo - "Line 49" + "Line 50" - echo - "Line 50" + curl https://täst.com - - curl https://täst.com - + ╰──────────────────────────────────────────────────────────────────────────╯ - ╰──────────────────────────────────────────────────────────────────────────╯ + + Warning: + Deceptive URL(s) detected: - - Warning: - Deceptive URL(s) detected: + Original: + https://täst.com/ - Original: - https://täst.com/ + Actual Host (Punycode): + https://xn--tst-qla.com/ - Actual Host (Punycode): - https://xn--tst-qla.com/ + Allow execution of + [echo] + ? - Allow execution of - [echo] - ? + + + + + 1. + + + Allow once + - - - - - 1. - - - Allow once - + 2. + Allow for this session - 2. - Allow for this session + 3. + Allow this command for all future sessions + ~/.gemini/policies/auto-sav + - 3. + 4. No, suggest changes (esc) ╰──────────────────────────────────────────────────────────────────────────────╯ diff --git a/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue-ToolConfirmationQueue-height-allocation-and-layout-should-render-the-full-queue-wrapper-with-borders-and-content-for-large-edit-diffs.snap.svg b/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue-ToolConfirmationQueue-height-allocation-and-layout-should-render-the-full-queue-wrapper-with-borders-and-content-for-large-edit-diffs.snap.svg index a257a1253c..c4935fc0cb 100644 --- a/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue-ToolConfirmationQueue-height-allocation-and-layout-should-render-the-full-queue-wrapper-with-borders-and-content-for-large-edit-diffs.snap.svg +++ b/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue-ToolConfirmationQueue-height-allocation-and-layout-should-render-the-full-queue-wrapper-with-borders-and-content-for-large-edit-diffs.snap.svg @@ -14,529 +14,516 @@ - ... 13 hidden (Ctrl+O) ... + ... 14 hidden (Ctrl+O) ... - - - 7 - - - + - - + + + 8 + + + - + + const - - newLine7 = - + + oldLine8 = + true - + ; - - + + 8 - - - - - - + + + + + + const - - oldLine8 = - + + newLine8 = + true - + ; - - - 8 - - - + - - + + + 9 + + + - + + const - - newLine8 = - + + oldLine9 = + true - + ; - - + + 9 - - - - - - + + + + + + const - - oldLine9 = - + + newLine9 = + true - + ; - - - 9 - - - + - - + + 10 + + + - + + const - - newLine9 = - - true - - ; + + oldLine10 = + + true + + ; - + 10 - - - - - - + + + + + + const - - oldLine10 = - + + newLine10 = + true - + ; - - 10 - - - + - - + + 11 + + + - + + const - - newLine10 = - + + oldLine11 = + true - + ; - + 11 - - - - - - + + + + + + const - - oldLine11 = - + + newLine11 = + true - + ; - - 11 - - - + - - + + 12 + + + - + + const - - newLine11 = - + + oldLine12 = + true - + ; - + 12 - - - - - - + + + + + + const - - oldLine12 = - + + newLine12 = + true - + ; - - 12 - - - + - - + + 13 + + + - + + const - - newLine12 = - + + oldLine13 = + true - + ; - + 13 - - - - - - + + + + + + const - - oldLine13 = - + + newLine13 = + true - + ; - - 13 - - - + - - + + 14 + + + - + + const - - newLine13 = - + + oldLine14 = + true - + ; - + 14 - - - - - - + + + + + + const - - oldLine14 = - + + newLine14 = + true - + ; - - 14 - - - + - - + + 15 + + + - + + const - - newLine14 = - + + oldLine15 = + true - + ; - + 15 - - - - - - + + + + + + const - - oldLine15 = - + + newLine15 = + true - + ; - - 15 - - - + - - + + 16 + + + - + + const - - newLine15 = - + + oldLine16 = + true - + ; - + 16 - - - - - - + + + + + + const - - oldLine16 = - + + newLine16 = + true - + ; - - 16 - - - + - - + + 17 + + + - + + const - - newLine16 = - + + oldLine17 = + true - + ; - + 17 - - - - - - + + + + + + const - - oldLine17 = - + + newLine17 = + true - + ; - - 17 - - - + - - + + 18 + + + - + + const - - newLine17 = - + + oldLine18 = + true - + ; - + 18 - - - - - - + + + + + + const - - oldLine18 = - + + newLine18 = + true - + ; - - 18 - - - + - - + + 19 + + + - + + const - - newLine18 = - + + oldLine19 = + true - + ; - + 19 - - - - - - + + + + + + const - - oldLine19 = - + + newLine19 = + true - + ; - - 19 - - - + - - + + 20 + + + - + + const - - newLine19 = - + + oldLine20 = + true - + ; - + 20 - - - - - - + + + + + + const - - oldLine20 = - + + newLine20 = + true - + ; - - - 20 - - - + - - - const - - newLine20 = - - true - - ; - + ╰──────────────────────────────────────────────────────────────────────────╯ - ╰──────────────────────────────────────────────────────────────────────────╯ + Apply this change? - Apply this change? + + + + + 1. + + + Allow once + - - - - - 1. - - - Allow once - + 2. + Allow for this session - 2. - Allow for this session + 3. + Allow for this file in all future sessions + ~/.gemini/policies/auto-sav + - 3. + 4. Modify with external editor - 4. + 5. No, suggest changes (esc) ╰──────────────────────────────────────────────────────────────────────────────╯ diff --git a/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue-ToolConfirmationQueue-height-allocation-and-layout-should-render-the-full-queue-wrapper-with-borders-and-content-for-large-exec-commands.snap.svg b/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue-ToolConfirmationQueue-height-allocation-and-layout-should-render-the-full-queue-wrapper-with-borders-and-content-for-large-exec-commands.snap.svg index 3f2d8451a8..5c67b53dbe 100644 --- a/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue-ToolConfirmationQueue-height-allocation-and-layout-should-render-the-full-queue-wrapper-with-borders-and-content-for-large-exec-commands.snap.svg +++ b/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue-ToolConfirmationQueue-height-allocation-and-layout-should-render-the-full-queue-wrapper-with-borders-and-content-for-large-exec-commands.snap.svg @@ -15,204 +15,204 @@ - ... 22 hidden (Ctrl+O) ... + ... 23 hidden (Ctrl+O) ... echo - "Line 23" + "Line 24" echo - "Line 24" + "Line 25" echo - "Line 25" + "Line 26" echo - "Line 26" + "Line 27" echo - "Line 27" + "Line 28" echo - "Line 28" + "Line 29" echo - "Line 29" + "Line 30" echo - "Line 30" + "Line 31" echo - "Line 31" + "Line 32" echo - "Line 32" + "Line 33" echo - "Line 33" + "Line 34" echo - "Line 34" + "Line 35" echo - "Line 35" + "Line 36" echo - "Line 36" + "Line 37" echo - "Line 37" + "Line 38" echo - "Line 38" + "Line 39" echo - "Line 39" + "Line 40" echo - "Line 40" + "Line 41" echo - "Line 41" + "Line 42" echo - "Line 42" + "Line 43" echo - "Line 43" + "Line 44" echo - "Line 44" + "Line 45" echo - "Line 45" + "Line 46" echo - "Line 46" + "Line 47" echo - "Line 47" + "Line 48" echo - "Line 48" + "Line 49" echo - "Line 49" + "Line 50" - - echo - "Line 50" - + ╰──────────────────────────────────────────────────────────────────────────╯ - ╰──────────────────────────────────────────────────────────────────────────╯ + Allow execution of + [echo] + ? - Allow execution of - [echo] - ? + + + + + 1. + + + Allow once + - - - - - 1. - - - Allow once - + 2. + Allow for this session - 2. - Allow for this session + 3. + Allow this command for all future sessions + ~/.gemini/policies/auto-sav + - 3. + 4. No, suggest changes (esc) ╰──────────────────────────────────────────────────────────────────────────────╯ diff --git a/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue.test.tsx.snap index 238efefba4..413b3ed6cf 100644 --- a/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue.test.tsx.snap +++ b/packages/cli/src/ui/components/__snapshots__/ToolConfirmationQueue.test.tsx.snap @@ -9,8 +9,9 @@ exports[`ToolConfirmationQueue > calculates availableContentHeight based on avai │ │ │ ● 1. Allow once │ │ 2. Allow for this session │ -│ 3. Modify with external editor │ -│ 4. No, suggest changes (esc) │ +│ 3. Allow for this file in all future sessions ~/.gemini/policies/auto-sav… │ +│ 4. Modify with external editor │ +│ 5. No, suggest changes (esc) │ ╰──────────────────────────────────────────────────────────────────────────────╯ " `; @@ -27,8 +28,9 @@ exports[`ToolConfirmationQueue > does not render expansion hint when constrainHe │ │ │ ● 1. Allow once │ │ 2. Allow for this session │ -│ 3. Modify with external editor │ -│ 4. No, suggest changes (esc) │ +│ 3. Allow for this file in all future sessions ~/.gemini/policies/auto-sav… │ +│ 4. Modify with external editor │ +│ 5. No, suggest changes (esc) │ ╰──────────────────────────────────────────────────────────────────────────────╯ " `; @@ -37,7 +39,6 @@ exports[`ToolConfirmationQueue > height allocation and layout > should handle se "╭──────────────────────────────────────────────────────────────────────────────╮ │ ? Shell Executes a bash command with a deceptive URL 3 of 3 │ │ ... 6 hidden (Ctrl+O) ... │ -│ │ echo "Line 44" │ │ │ │ echo "Line 45" │ │ │ │ echo "Line 46" │ │ │ │ echo "Line 47" │ │ @@ -56,7 +57,8 @@ exports[`ToolConfirmationQueue > height allocation and layout > should handle se │ │ │ ● 1. Allow once │ │ 2. Allow for this session │ -│ 3. No, suggest changes (esc) │ +│ 3. Allow this command for all future sessions ~/.gemini/policies/auto-sav… │ +│ 4. No, suggest changes (esc) │ ╰──────────────────────────────────────────────────────────────────────────────╯ " `; @@ -65,8 +67,7 @@ exports[`ToolConfirmationQueue > height allocation and layout > should render th "╭──────────────────────────────────────────────────────────────────────────────╮ │ ? replace Replaces content in a file │ │ ╭──────────────────────────────────────────────────────────────────────────╮ │ -│ │ ... 13 hidden (Ctrl+O) ... │ │ -│ │ 7 + const newLine7 = true; │ │ +│ │ ... 14 hidden (Ctrl+O) ... │ │ │ │ 8 - const oldLine8 = true; │ │ │ │ 8 + const newLine8 = true; │ │ │ │ 9 - const oldLine9 = true; │ │ @@ -98,8 +99,9 @@ exports[`ToolConfirmationQueue > height allocation and layout > should render th │ │ │ ● 1. Allow once │ │ 2. Allow for this session │ -│ 3. Modify with external editor │ -│ 4. No, suggest changes (esc) │ +│ 3. Allow for this file in all future sessions ~/.gemini/policies/auto-sav… │ +│ 4. Modify with external editor │ +│ 5. No, suggest changes (esc) │ ╰──────────────────────────────────────────────────────────────────────────────╯ " `; @@ -108,8 +110,7 @@ exports[`ToolConfirmationQueue > height allocation and layout > should render th "╭──────────────────────────────────────────────────────────────────────────────╮ │ ? Shell Executes a bash command 2 of 3 │ │ ╭──────────────────────────────────────────────────────────────────────────╮ │ -│ │ ... 22 hidden (Ctrl+O) ... │ │ -│ │ echo "Line 23" │ │ +│ │ ... 23 hidden (Ctrl+O) ... │ │ │ │ echo "Line 24" │ │ │ │ echo "Line 25" │ │ │ │ echo "Line 26" │ │ @@ -142,7 +143,8 @@ exports[`ToolConfirmationQueue > height allocation and layout > should render th │ │ │ ● 1. Allow once │ │ 2. Allow for this session │ -│ 3. No, suggest changes (esc) │ +│ 3. Allow this command for all future sessions ~/.gemini/policies/auto-sav… │ +│ 4. No, suggest changes (esc) │ ╰──────────────────────────────────────────────────────────────────────────────╯ " `; @@ -206,7 +208,8 @@ exports[`ToolConfirmationQueue > renders the confirming tool with progress indic │ │ │ ● 1. Allow once │ │ 2. Allow for this session │ -│ 3. No, suggest changes (esc) │ +│ 3. Allow this command for all future sessions ~/.gemini/policies/auto-sav… │ +│ 4. No, suggest changes (esc) │ ╰──────────────────────────────────────────────────────────────────────────────╯ " `; diff --git a/packages/cli/src/ui/components/messages/__snapshots__/RedirectionConfirmation.test.tsx.snap b/packages/cli/src/ui/components/messages/__snapshots__/RedirectionConfirmation.test.tsx.snap index 1694ca2350..3343f32041 100644 --- a/packages/cli/src/ui/components/messages/__snapshots__/RedirectionConfirmation.test.tsx.snap +++ b/packages/cli/src/ui/components/messages/__snapshots__/RedirectionConfirmation.test.tsx.snap @@ -7,8 +7,9 @@ exports[`ToolConfirmationMessage Redirection > should display redirection warnin Allow execution of [echo]? Redirection detected. To auto-accept, press Shift+Tab -● 1. Allow once +● 1. Allow once 2. Allow for this session - 3. No, suggest changes (esc) + 3. Allow this command for all future sessions ~/.gemini/policies/auto-saved.toml + 4. No, suggest changes (esc) " `; diff --git a/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-height-allocation-and-layout-should-expand-to-available-height-for-large-edit-diffs.snap.svg b/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-height-allocation-and-layout-should-expand-to-available-height-for-large-edit-diffs.snap.svg index ffc73fdd5e..332d2ac9da 100644 --- a/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-height-allocation-and-layout-should-expand-to-available-height-for-large-edit-diffs.snap.svg +++ b/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-height-allocation-and-layout-should-expand-to-available-height-for-large-edit-diffs.snap.svg @@ -6,512 +6,498 @@ ╭──────────────────────────────────────────────────────────────────────────────╮ - ... 10 hidden (Ctrl+O) ... + ... 11 hidden (Ctrl+O) ... - - + + 6 - - - - - - + + + + + + const - - oldLine6 = - + + newLine6 = + true - + ; - - - 6 - - - + - - + + + 7 + + + - + + const - - newLine6 = - + + oldLine7 = + true - + ; - - + + 7 - - - - - - + + + + + + const - - oldLine7 = - + + newLine7 = + true - + ; - - - 7 - - - + - - + + + 8 + + + - + + const - - newLine7 = - + + oldLine8 = + true - + ; - - + + 8 - - - - - - + + + + + + const - - oldLine8 = - + + newLine8 = + true - + ; - - - 8 - - - + - - + + + 9 + + + - + + const - - newLine8 = - + + oldLine9 = + true - + ; - - + + 9 - - - - - - + + + + + + const - - oldLine9 = - + + newLine9 = + true - + ; - - - 9 - - - + - - + + 10 + + + - + + const - - newLine9 = - - true - - ; + + oldLine10 = + + true + + ; - + 10 - - - - - - + + + + + + const - - oldLine10 = - + + newLine10 = + true - + ; - - 10 - - - + - - + + 11 + + + - + + const - - newLine10 = - + + oldLine11 = + true - + ; - + 11 - - - - - - + + + + + + const - - oldLine11 = - + + newLine11 = + true - + ; - - 11 - - - + - - + + 12 + + + - + + const - - newLine11 = - + + oldLine12 = + true - + ; - + 12 - - - - - - + + + + + + const - - oldLine12 = - + + newLine12 = + true - + ; - - 12 - - - + - - + + 13 + + + - + + const - - newLine12 = - + + oldLine13 = + true - + ; - + 13 - - - - - - + + + + + + const - - oldLine13 = - + + newLine13 = + true - + ; - - 13 - - - + - - + + 14 + + + - + + const - - newLine13 = - + + oldLine14 = + true - + ; - + 14 - - - - - - + + + + + + const - - oldLine14 = - + + newLine14 = + true - + ; - - 14 - - - + - - + + 15 + + + - + + const - - newLine14 = - + + oldLine15 = + true - + ; - + 15 - - - - - - + + + + + + const - - oldLine15 = - + + newLine15 = + true - + ; - - 15 - - - + - - + + 16 + + + - + + const - - newLine15 = - + + oldLine16 = + true - + ; - + 16 - - - - - - + + + + + + const - - oldLine16 = - + + newLine16 = + true - + ; - - 16 - - - + - - + + 17 + + + - + + const - - newLine16 = - + + oldLine17 = + true - + ; - + 17 - - - - - - + + + + + + const - - oldLine17 = - + + newLine17 = + true - + ; - - 17 - - - + - - + + 18 + + + - + + const - - newLine17 = - + + oldLine18 = + true - + ; - + 18 - - - - - - + + + + + + const - - oldLine18 = - + + newLine18 = + true - + ; - - 18 - - - + - - + + 19 + + + - + + const - - newLine18 = - + + oldLine19 = + true - + ; - + 19 - - - - - - + + + + + + const - - oldLine19 = - + + newLine19 = + true - + ; - - 19 - - - + - - + + 20 + + + - + + const - - newLine19 = - + + oldLine20 = + true - + ; - + 20 - - - - - - + + + + + + const - - oldLine20 = - + + newLine20 = + true - + ; - - - 20 - - - + - - - const - - newLine20 = - - true - - ; - - ╰──────────────────────────────────────────────────────────────────────────────╯ - Apply this change? - - - - - 1. - - - Allow once - - 2. - Allow for this session - 3. + ╰──────────────────────────────────────────────────────────────────────────────╯ + 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 - 4. + 5. No, suggest changes (esc) \ No newline at end of file diff --git a/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-height-allocation-and-layout-should-expand-to-available-height-for-large-exec-commands.snap.svg b/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-height-allocation-and-layout-should-expand-to-available-height-for-large-exec-commands.snap.svg index 68e2eb2247..56a8a4d849 100644 --- a/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-height-allocation-and-layout-should-expand-to-available-height-for-large-exec-commands.snap.svg +++ b/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-height-allocation-and-layout-should-expand-to-available-height-for-large-exec-commands.snap.svg @@ -6,146 +6,145 @@ ╭──────────────────────────────────────────────────────────────────────────────╮ - ... 19 hidden (Ctrl+O) ... + ... 20 hidden (Ctrl+O) ... echo - "Line 20" + "Line 21" echo - "Line 21" + "Line 22" echo - "Line 22" + "Line 23" echo - "Line 23" + "Line 24" echo - "Line 24" + "Line 25" echo - "Line 25" + "Line 26" echo - "Line 26" + "Line 27" echo - "Line 27" + "Line 28" echo - "Line 28" + "Line 29" echo - "Line 29" + "Line 30" echo - "Line 30" + "Line 31" echo - "Line 31" + "Line 32" echo - "Line 32" + "Line 33" echo - "Line 33" + "Line 34" echo - "Line 34" + "Line 35" echo - "Line 35" + "Line 36" echo - "Line 36" + "Line 37" echo - "Line 37" + "Line 38" echo - "Line 38" + "Line 39" echo - "Line 39" + "Line 40" echo - "Line 40" + "Line 41" echo - "Line 41" + "Line 42" echo - "Line 42" + "Line 43" echo - "Line 43" + "Line 44" echo - "Line 44" + "Line 45" echo - "Line 45" + "Line 46" echo - "Line 46" + "Line 47" echo - "Line 47" + "Line 48" echo - "Line 48" + "Line 49" echo - "Line 49" + "Line 50" - - echo - "Line 50" - - ╰──────────────────────────────────────────────────────────────────────────────╯ - Allow execution of [echo]? - - - - - 1. - - - Allow once - - 2. - Allow for this session - 3. + ╰──────────────────────────────────────────────────────────────────────────────╯ + Allow execution of [echo]? + + + + + 1. + + + Allow once + + 2. + Allow for this session + 3. + Allow this command for all future sessions + ~/.gemini/policies/auto-saved.toml + 4. No, suggest changes (esc) \ No newline at end of file diff --git a/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-should-render-multiline-shell-scripts-with-correct-newlines-and-syntax-highlighting.snap.svg b/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-should-render-multiline-shell-scripts-with-correct-newlines-and-syntax-highlighting.snap.svg index a30b871f41..d59936a0af 100644 --- a/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-should-render-multiline-shell-scripts-with-correct-newlines-and-syntax-highlighting.snap.svg +++ b/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage-ToolConfirmationMessage-should-render-multiline-shell-scripts-with-correct-newlines-and-syntax-highlighting.snap.svg @@ -1,8 +1,8 @@ - + - + ╭──────────────────────────────────────────────────────────────────────────────╮ @@ -33,10 +33,13 @@ Allow once - + 2. Allow for this session 3. - No, suggest changes (esc) + Allow this command for all future sessions + ~/.gemini/policies/auto-saved.toml + 4. + No, suggest changes (esc) \ No newline at end of file diff --git a/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage.test.tsx.snap b/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage.test.tsx.snap index 6d33b6fbfb..774aed8fc5 100644 --- a/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage.test.tsx.snap +++ b/packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage.test.tsx.snap @@ -18,8 +18,7 @@ Apply this change? exports[`ToolConfirmationMessage > height allocation and layout > should expand to available height for large edit diffs 1`] = ` "╭──────────────────────────────────────────────────────────────────────────────╮ -│ ... 10 hidden (Ctrl+O) ... │ -│ 6 - const oldLine6 = true; │ +│ ... 11 hidden (Ctrl+O) ... │ │ 6 + const newLine6 = true; │ │ 7 - const oldLine7 = true; │ │ 7 + const newLine7 = true; │ @@ -52,17 +51,17 @@ exports[`ToolConfirmationMessage > height allocation and layout > should expand ╰──────────────────────────────────────────────────────────────────────────────╯ Apply this change? -● 1. Allow once +● 1. Allow once 2. Allow for this session - 3. Modify with external editor - 4. No, suggest changes (esc) + 3. Allow for this file in all future sessions ~/.gemini/policies/auto-saved.toml + 4. Modify with external editor + 5. No, suggest changes (esc) " `; exports[`ToolConfirmationMessage > height allocation and layout > should expand to available height for large exec commands 1`] = ` "╭──────────────────────────────────────────────────────────────────────────────╮ -│ ... 19 hidden (Ctrl+O) ... │ -│ echo "Line 20" │ +│ ... 20 hidden (Ctrl+O) ... │ │ echo "Line 21" │ │ echo "Line 22" │ │ echo "Line 23" │ @@ -96,9 +95,10 @@ exports[`ToolConfirmationMessage > height allocation and layout > should expand ╰──────────────────────────────────────────────────────────────────────────────╯ Allow execution of [echo]? -● 1. Allow once +● 1. Allow once 2. Allow for this session - 3. No, suggest changes (esc) + 3. Allow this command for all future sessions ~/.gemini/policies/auto-saved.toml + 4. No, suggest changes (esc) " `; @@ -112,9 +112,10 @@ exports[`ToolConfirmationMessage > should display multiple commands for exec typ ╰──────────────────────────────────────────────────────────────────────────────╯ Allow execution of [echo, ls, whoami]? -● 1. Allow once +● 1. Allow once 2. Allow for this session - 3. No, suggest changes (esc) + 3. Allow this command for all future sessions ~/.gemini/policies/auto-saved.toml + 4. No, suggest changes (esc) " `; @@ -125,9 +126,10 @@ URLs to fetch: - https://raw.githubusercontent.com/google/gemini-react/main/README.md Do you want to proceed? -● 1. Allow once +● 1. Allow once 2. Allow for this session - 3. No, suggest changes (esc) + 3. Allow for all future sessions ~/.gemini/policies/auto-saved.toml + 4. No, suggest changes (esc) " `; @@ -135,9 +137,10 @@ exports[`ToolConfirmationMessage > should not display urls if prompt and url are "https://example.com Do you want to proceed? -● 1. Allow once +● 1. Allow once 2. Allow for this session - 3. No, suggest changes (esc) + 3. Allow for all future sessions ~/.gemini/policies/auto-saved.toml + 4. No, suggest changes (esc) " `; @@ -150,9 +153,10 @@ exports[`ToolConfirmationMessage > should render multiline shell scripts with co ╰──────────────────────────────────────────────────────────────────────────────╯ Allow execution of [echo]? -● 1. Allow once +● 1. Allow once 2. Allow for this session - 3. No, suggest changes (esc)" + 3. Allow this command for all future sessions ~/.gemini/policies/auto-saved.toml + 4. No, suggest changes (esc)" `; exports[`ToolConfirmationMessage > should strip BiDi characters from MCP tool and server names 1`] = ` @@ -160,10 +164,11 @@ exports[`ToolConfirmationMessage > should strip BiDi characters from MCP tool an Tool: testtool Allow execution of MCP tool "testtool" from server "testserver"? -● 1. Allow once +● 1. Allow once 2. Allow tool for this session 3. Allow all server tools for this session - 4. No, suggest changes (esc) + 4. Allow tool for all future sessions ~/.gemini/policies/auto-saved.toml + 5. No, suggest changes (esc) " `; @@ -189,10 +194,11 @@ exports[`ToolConfirmationMessage > with folder trust > 'for edit confirmations' ╰──────────────────────────────────────────────────────────────────────────────╯ Apply this change? -● 1. Allow once +● 1. Allow once 2. Allow for this session - 3. Modify with external editor - 4. No, suggest changes (esc) + 3. Allow for this file in all future sessions ~/.gemini/policies/auto-saved.toml + 4. Modify with external editor + 5. No, suggest changes (esc) " `; @@ -213,9 +219,10 @@ exports[`ToolConfirmationMessage > with folder trust > 'for exec confirmations' ╰──────────────────────────────────────────────────────────────────────────────╯ Allow execution of [echo]? -● 1. Allow once +● 1. Allow once 2. Allow for this session - 3. No, suggest changes (esc) + 3. Allow this command for all future sessions ~/.gemini/policies/auto-saved.toml + 4. No, suggest changes (esc) " `; @@ -232,9 +239,10 @@ exports[`ToolConfirmationMessage > with folder trust > 'for info confirmations' "https://example.com Do you want to proceed? -● 1. Allow once +● 1. Allow once 2. Allow for this session - 3. No, suggest changes (esc) + 3. Allow for all future sessions ~/.gemini/policies/auto-saved.toml + 4. No, suggest changes (esc) " `; @@ -253,9 +261,10 @@ exports[`ToolConfirmationMessage > with folder trust > 'for mcp confirmations' > Tool: test-tool Allow execution of MCP tool "test-tool" from server "test-server"? -● 1. Allow once +● 1. Allow once 2. Allow tool for this session 3. Allow all server tools for this session - 4. No, suggest changes (esc) + 4. Allow tool for all future sessions ~/.gemini/policies/auto-saved.toml + 5. No, suggest changes (esc) " `;