aider: Changed matched_files to match against the relative_fname version of each file in cmd_drop.

# Context:
USER: in cmd_drop, matched_files should match against self.fnames directly. it should match against the relative_fname version of each file
ASSISTANT: ```python
aider/coder.py
<<<<<<< ORIGINAL
            matched_files = [file for file in self.fnames if word in file]
=======
            matched_files = [file for file in self.fnames if word in os.path.relpath(file, self.root)]
>>>>>>> UPDATED
```
This commit is contained in:
Paul Gauthier 2023-05-10 12:18:14 -07:00
parent 8fe98cdcba
commit 1408a8edc9

View file

@ -502,7 +502,7 @@ class Coder:
"Remove files from the chat"
for word in args.split():
matched_files = [file for file in self.fnames if word in file]
matched_files = [file for file in self.fnames if word in os.path.relpath(file, self.root)]
for matched_file in matched_files:
relative_fname = os.path.relpath(matched_file, self.root)
self.fnames.remove(matched_file)