diff --git a/aider/commands.py b/aider/commands.py index e933956f1..fe70dbe75 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -739,6 +739,9 @@ class Commands: else: add = True instructions = response + if response.strip(): + self.io.user_input(response, log_only=True) + self.io.add_to_input_history(response) if add: for line in combined_output.splitlines(): diff --git a/aider/io.py b/aider/io.py index 0cdd00d59..925d60aac 100644 --- a/aider/io.py +++ b/aider/io.py @@ -481,9 +481,6 @@ class InputOutput: else: res = prompt(question + " ", default=default, style=style) - if res.strip(): - self.user_input(res, log_only=True) - hist = f"{question.strip()} {res.strip()}" self.append_chat_history(hist, linebreak=True, blockquote=True) if self.yes in (True, False):