From 5f1c6447a97cd28a26ce4f8eee7758386e9996b9 Mon Sep 17 00:00:00 2001 From: Adib234 <30782825+Adib234@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:22:21 -0500 Subject: [PATCH] feat(plan): update UI Theme for Plan Mode (#17243) --- .../cli/src/ui/components/InputPrompt.test.tsx | 15 +++++++++++++++ packages/cli/src/ui/components/InputPrompt.tsx | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/packages/cli/src/ui/components/InputPrompt.test.tsx b/packages/cli/src/ui/components/InputPrompt.test.tsx index 80ebb19567..ede9f0b780 100644 --- a/packages/cli/src/ui/components/InputPrompt.test.tsx +++ b/packages/cli/src/ui/components/InputPrompt.test.tsx @@ -1274,6 +1274,21 @@ describe('InputPrompt', () => { unmount(); }); + it('should render correctly in plan mode', async () => { + props.approvalMode = ApprovalMode.PLAN; + const { stdout, unmount } = renderWithProviders(); + + await waitFor(() => { + const frame = stdout.lastFrame(); + // In plan mode it uses '>' but with success color. + // We check that it contains '>' and not '*' or '!'. + expect(frame).toContain('>'); + expect(frame).not.toContain('*'); + expect(frame).not.toContain('!'); + }); + unmount(); + }); + it('should NOT clear the buffer on Ctrl+C if it is empty', async () => { props.buffer.text = ''; const { stdin, unmount } = renderWithProviders(, { diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx index 8a24c6dcda..c1c3644f20 100644 --- a/packages/cli/src/ui/components/InputPrompt.tsx +++ b/packages/cli/src/ui/components/InputPrompt.tsx @@ -1043,6 +1043,8 @@ export const InputPrompt: React.FC = ({ !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT; const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO; + const showPlanStyling = + !shellModeActive && approvalMode === ApprovalMode.PLAN; let statusColor: string | undefined; let statusText = ''; @@ -1052,6 +1054,9 @@ export const InputPrompt: React.FC = ({ } else if (showYoloStyling) { statusColor = theme.status.error; statusText = 'YOLO mode'; + } else if (showPlanStyling) { + statusColor = theme.status.success; + statusText = 'Plan mode'; } else if (showAutoAcceptStyling) { statusColor = theme.status.warning; statusText = 'Accepting edits';