diff --git a/packages/cli/src/ui/components/Composer.test.tsx b/packages/cli/src/ui/components/Composer.test.tsx
index 99a0237ac2..3d1d9b012e 100644
--- a/packages/cli/src/ui/components/Composer.test.tsx
+++ b/packages/cli/src/ui/components/Composer.test.tsx
@@ -394,7 +394,7 @@ describe('Composer', () => {
const { lastFrame } = renderComposer(uiState);
- expect(lastFrame()).toContain('Press Esc again to rewind');
+ expect(lastFrame()).toContain('Press Esc again to clear prompt');
});
});
diff --git a/packages/cli/src/ui/components/InputPrompt.test.tsx b/packages/cli/src/ui/components/InputPrompt.test.tsx
index ede9f0b780..91ad521e12 100644
--- a/packages/cli/src/ui/components/InputPrompt.test.tsx
+++ b/packages/cli/src/ui/components/InputPrompt.test.tsx
@@ -2004,32 +2004,6 @@ describe('InputPrompt', () => {
unmount();
});
- it('should submit /rewind on double ESC when buffer is empty', async () => {
- const onEscapePromptChange = vi.fn();
- props.onEscapePromptChange = onEscapePromptChange;
- props.buffer.setText('');
- vi.mocked(props.buffer.setText).mockClear();
-
- const { stdin, unmount } = renderWithProviders(
- ,
- {
- uiState: {
- history: [{ id: 1, type: 'user', text: 'test' }],
- },
- },
- );
-
- await act(async () => {
- stdin.write('\x1B\x1B');
- vi.advanceTimersByTime(100);
- });
-
- await waitFor(() => {
- expect(props.onSubmit).toHaveBeenCalledWith('/rewind');
- });
- unmount();
- });
-
it('should clear the buffer on esc esc if it has text', async () => {
const onEscapePromptChange = vi.fn();
props.onEscapePromptChange = onEscapePromptChange;
diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx
index c1c3644f20..a9b9ab113d 100644
--- a/packages/cli/src/ui/components/InputPrompt.tsx
+++ b/packages/cli/src/ui/components/InputPrompt.tsx
@@ -30,7 +30,7 @@ import { useKeypress } from '../hooks/useKeypress.js';
import { keyMatchers, Command } from '../keyMatchers.js';
import type { CommandContext, SlashCommand } from '../commands/types.js';
import type { Config } from '@google/gemini-cli-core';
-import { ApprovalMode, coreEvents, debugLogger } from '@google/gemini-cli-core';
+import { ApprovalMode, debugLogger } from '@google/gemini-cli-core';
import {
parseInputForHighlighting,
parseSegmentsFromTokens,
@@ -141,7 +141,7 @@ export const InputPrompt: React.FC = ({
const kittyProtocol = useKittyKeyboardProtocol();
const isShellFocused = useShellFocusState();
const { setEmbeddedShellFocused } = useUIActions();
- const { mainAreaWidth, activePtyId, history } = useUIState();
+ const { mainAreaWidth, activePtyId } = useUIState();
const [justNavigatedHistory, setJustNavigatedHistory] = useState(false);
const escPressCount = useRef(0);
const [showEscapePrompt, setShowEscapePrompt] = useState(false);
@@ -525,12 +525,7 @@ export const InputPrompt: React.FC = ({
buffer.setText('');
resetCompletionState();
return;
- } else if (history.length > 0) {
- onSubmit('/rewind');
- return;
}
- coreEvents.emitFeedback('info', 'Nothing to rewind to');
- return;
}
if (shellModeActive && keyMatchers[Command.REVERSE_SEARCH](key)) {
@@ -898,10 +893,8 @@ export const InputPrompt: React.FC = ({
kittyProtocol.enabled,
tryLoadQueuedMessages,
setBannerVisible,
- onSubmit,
activePtyId,
setEmbeddedShellFocused,
- history,
],
);
diff --git a/packages/cli/src/ui/components/StatusDisplay.tsx b/packages/cli/src/ui/components/StatusDisplay.tsx
index 45dcef10ba..fe7bdd57a5 100644
--- a/packages/cli/src/ui/components/StatusDisplay.tsx
+++ b/packages/cli/src/ui/components/StatusDisplay.tsx
@@ -45,17 +45,8 @@ export const StatusDisplay: React.FC = ({
}
if (uiState.showEscapePrompt) {
- const isPromptEmpty = uiState.buffer.text.length === 0;
- const hasHistory = uiState.history.length > 0;
-
- if (isPromptEmpty && !hasHistory) {
- return null;
- }
-
return (
-
- Press Esc again to {isPromptEmpty ? 'rewind' : 'clear prompt'}.
-
+ Press Esc again to clear prompt.
);
}
diff --git a/packages/cli/src/ui/components/__snapshots__/StatusDisplay.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/StatusDisplay.test.tsx.snap
index 4f6c4f2231..885fc2e65a 100644
--- a/packages/cli/src/ui/components/__snapshots__/StatusDisplay.test.tsx.snap
+++ b/packages/cli/src/ui/components/__snapshots__/StatusDisplay.test.tsx.snap
@@ -12,7 +12,7 @@ exports[`StatusDisplay > renders Ctrl+D prompt 1`] = `"Press Ctrl+D again to exi
exports[`StatusDisplay > renders Escape prompt when buffer is NOT empty 1`] = `"Press Esc again to clear prompt."`;
-exports[`StatusDisplay > renders Escape prompt when buffer is empty 1`] = `"Press Esc again to rewind."`;
+exports[`StatusDisplay > renders Escape prompt when buffer is empty 1`] = `"Press Esc again to clear prompt."`;
exports[`StatusDisplay > renders HookStatusDisplay when hooks are active 1`] = `"Mock Hook Status Display"`;