Skip to content

Commit 4d85ce4

Browse files
authored
Turns out the node console.clear() clears the buffer. (#12959)
1 parent 7ec7845 commit 4d85ce4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

packages/cli/src/ui/AppContainer.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,9 +734,16 @@ Logging in with Google... Please restart Gemini CLI to continue.
734734
const handleClearScreen = useCallback(() => {
735735
historyManager.clearItems();
736736
clearConsoleMessagesState();
737-
console.clear();
737+
if (!isAlternateBuffer) {
738+
console.clear();
739+
}
738740
refreshStatic();
739-
}, [historyManager, clearConsoleMessagesState, refreshStatic]);
741+
}, [
742+
historyManager,
743+
clearConsoleMessagesState,
744+
refreshStatic,
745+
isAlternateBuffer,
746+
]);
740747

741748
const { handleInput: vimHandleInput } = useVim(buffer, handleFinalSubmit);
742749

0 commit comments

Comments
 (0)