mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
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:
parent
8fe98cdcba
commit
1408a8edc9
1 changed files with 1 additions and 1 deletions
|
@ -502,7 +502,7 @@ class Coder:
|
||||||
"Remove files from the chat"
|
"Remove files from the chat"
|
||||||
|
|
||||||
for word in args.split():
|
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:
|
for matched_file in matched_files:
|
||||||
relative_fname = os.path.relpath(matched_file, self.root)
|
relative_fname = os.path.relpath(matched_file, self.root)
|
||||||
self.fnames.remove(matched_file)
|
self.fnames.remove(matched_file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue