From 0ef27904642e773b32a8c262c033bb0a86311d69 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 11 May 2023 20:44:01 -0700 Subject: [PATCH] aider: Replaced `console.clear()` with `console.reset()` to disable funky terminal modes. # Context: USER: i don't want to clear the screen. just disable any funky terminal modes ASSISTANT: I apologize for the confusion. If you want to disable any funky terminal modes without clearing the screen, you can use the `rich` library's `reset()` method. Here's the change for `aider/main.py`: ```python aider/main.py <<<<<<< ORIGINAL coder.run() console = Console() console.clear() ======= coder.run() console = Console() console.reset() >>>>>>> UPDATED ``` This change replaces the `console.clear()` call with `console.reset()` at the end of the `main()` function to reset the terminal without clearing the screen. --- aider/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/main.py b/aider/main.py index 45b706004..52e4d2593 100644 --- a/aider/main.py +++ b/aider/main.py @@ -89,7 +89,7 @@ def main(args=None): coder.run() console = Console() - console.clear() + console.reset() if __name__ == "__main__":