refactor: modify command parsing to use last word only

This commit is contained in:
Paul Gauthier 2024-10-04 11:20:55 -07:00 committed by Paul Gauthier (aider)
parent 0c743ce8e8
commit 7ff2dc89b4

View file

@ -586,7 +586,7 @@ class Commands:
text = document.text_before_cursor text = document.text_before_cursor
# Skip the first word and the space after it # 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 # Create a new Document object with the text after the command
new_document = Document(after_command, cursor_position=len(after_command)) new_document = Document(after_command, cursor_position=len(after_command))