From 7ff2dc89b4c718f0eb69fc50fab3d14702ef61d0 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 4 Oct 2024 11:20:55 -0700 Subject: [PATCH] refactor: modify command parsing to use last word only --- aider/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/commands.py b/aider/commands.py index c1958ac79..4b47b3927 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -586,7 +586,7 @@ class Commands: text = document.text_before_cursor # Skip the first word and the space after it - after_command = " ".join(text.split()[1:]) + after_command = text.split()[-1] # Create a new Document object with the text after the command new_document = Document(after_command, cursor_position=len(after_command))