Turns out the node console.clear() clears the buffer. (#12959)

This commit is contained in:
Jacob Richman
2025-11-12 12:15:25 -08:00
committed by GitHub
parent 7ec78452ec
commit 4d85ce40be
+9 -2
View File
@@ -734,9 +734,16 @@ Logging in with Google... Please restart Gemini CLI to continue.
const handleClearScreen = useCallback(() => { const handleClearScreen = useCallback(() => {
historyManager.clearItems(); historyManager.clearItems();
clearConsoleMessagesState(); clearConsoleMessagesState();
console.clear(); if (!isAlternateBuffer) {
console.clear();
}
refreshStatic(); refreshStatic();
}, [historyManager, clearConsoleMessagesState, refreshStatic]); }, [
historyManager,
clearConsoleMessagesState,
refreshStatic,
isAlternateBuffer,
]);
const { handleInput: vimHandleInput } = useVim(buffer, handleFinalSubmit); const { handleInput: vimHandleInput } = useVim(buffer, handleFinalSubmit);