From 2ac077603bd2312bf1188e64c8ccd1ca8599a3fd Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 20 Nov 2024 08:16:55 -0800 Subject: [PATCH] feat: Update add_to_input_history to immediately update prompt session history --- aider/io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/io.py b/aider/io.py index cbbbd944a..0967b0da7 100644 --- a/aider/io.py +++ b/aider/io.py @@ -478,8 +478,8 @@ class InputOutput: return FileHistory(self.input_history_file).append_string(inp) # Also add to the in-memory history if it exists - if hasattr(self, "session") and hasattr(self.session, "history"): - self.session.history.append_string(inp) + if self.prompt_session and self.prompt_session.history: + self.prompt_session.history.append_string(inp) def get_input_history(self): if not self.input_history_file: