From 14a62586cccc10125291c152726b253da7fcfdc4 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 25 Oct 2024 16:09:13 -0700 Subject: [PATCH] feat: add special handling for comments containing exclamation marks --- aider/io.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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: