feat: Add shell command to input history before execution

This commit is contained in:
Paul Gauthier (aider) 2024-08-21 05:17:18 -07:00
parent 623e4bb2d9
commit 4537e1a9f5
2 changed files with 5 additions and 0 deletions

View file

@ -311,6 +311,9 @@ class InputOutput:
if not self.input_history_file:
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)
def get_input_history(self):
if not self.input_history_file: