diff --git a/packages/cli/src/ui/components/ApprovalModeIndicator.tsx b/packages/cli/src/ui/components/ApprovalModeIndicator.tsx index 37cfb4fd21..eda94a20e6 100644 --- a/packages/cli/src/ui/components/ApprovalModeIndicator.tsx +++ b/packages/cli/src/ui/components/ApprovalModeIndicator.tsx @@ -7,7 +7,7 @@ import type React from 'react'; import { Box, Text } from 'ink'; import { theme } from '../semantic-colors.js'; -import { ApprovalMode } from '@google/gemini-cli-core'; +import { ApprovalMode, checkExhaustive } from '@google/gemini-cli-core'; import { formatCommand } from '../key/keybindingUtils.js'; import { Command } from '../key/keyBindings.js'; @@ -47,7 +47,12 @@ export const ApprovalModeIndicator: React.FC = ({ subText = `${cycleHint} to manual`; break; case ApprovalMode.DEFAULT: + textColor = theme.text.accent; + textContent = ''; + subText = `${cycleHint} to accept edits`; + break; default: + checkExhaustive(approvalMode); textColor = theme.text.accent; textContent = ''; subText = `${cycleHint} to accept edits`; diff --git a/packages/cli/src/ui/components/InputPrompt.test.tsx b/packages/cli/src/ui/components/InputPrompt.test.tsx index 0ada0892c3..35bc659490 100644 --- a/packages/cli/src/ui/components/InputPrompt.test.tsx +++ b/packages/cli/src/ui/components/InputPrompt.test.tsx @@ -4033,6 +4033,16 @@ describe('InputPrompt', () => { unmount(); }); + it('should render correctly with wildcard policy enabled', async () => { + props.isWildcardPolicyEnabled = true; + const { stdout, unmount } = await renderWithProviders( + , + ); + await waitFor(() => expect(stdout.lastFrame()).toContain('*')); + expect(stdout.lastFrame()).toMatchSnapshot(); + unmount(); + }); + it('should not show inverted cursor when shell is focused', async () => { props.isEmbeddedShellFocused = true; props.focus = false; diff --git a/packages/cli/src/ui/components/__snapshots__/InputPrompt.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/InputPrompt.test.tsx.snap index 78c5da7003..1f5564e26b 100644 --- a/packages/cli/src/ui/components/__snapshots__/InputPrompt.test.tsx.snap +++ b/packages/cli/src/ui/components/__snapshots__/InputPrompt.test.tsx.snap @@ -195,3 +195,10 @@ exports[`InputPrompt > snapshots > should render correctly when accepting edits ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ " `; + +exports[`InputPrompt > snapshots > should render correctly with wildcard policy enabled 1`] = ` +"▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ + * Type your message or @path/to/file +▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ +" +`; diff --git a/packages/core/src/tools/exit-plan-mode.ts b/packages/core/src/tools/exit-plan-mode.ts index f979e8107f..b280bcb069 100644 --- a/packages/core/src/tools/exit-plan-mode.ts +++ b/packages/core/src/tools/exit-plan-mode.ts @@ -259,7 +259,7 @@ Ask the user for specific feedback on how to improve the plan.`, // For non-interactive environment requires minimal user action, exit as AUTO_EDIT mode for plan implementation. return ApprovalMode.AUTO_EDIT; } - // By default, YOLO mode in interactive environment cannot enter/exit plan mode. + // By default, wildcard policies in interactive environment cannot enter/exit plan mode. // Always exit plan mode and move to default approval mode if exit_plan_mode tool is configured with allow decision. return ApprovalMode.DEFAULT; }