diff --git a/aider/io.py b/aider/io.py index 36beaeae0..04faa5e10 100644 --- a/aider/io.py +++ b/aider/io.py @@ -377,8 +377,11 @@ class InputOutput: ): if changed: dump(changed) - #ai if any of the .values() contain ! then join all the .values() into lines and return that - self.changed_files = list(changed.keys()) + # Check if any values contain ! + if any('!' in comment for comments in changed.values() if comments for comment in comments): + self.changed_files = ['\n'.join(comment for comments in changed.values() if comments for comment in comments)] + else: + self.changed_files = list(changed.keys()) self.interrupt_input() break except Exception as e: