diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index f48b3ec2cb2..97faeb0d764 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -1331,6 +1331,9 @@ async def preproc_user_input(self, inp): if not inp: return + # Strip whitespace from beginning and end + inp = inp.strip() + if self.commands.is_command(inp): if inp[0] in "!": inp = f"/run {inp[1:]}"