mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
do not /add files that fail to decode
This commit is contained in:
parent
c6e71b443b
commit
c2c80bbd3c
2 changed files with 6 additions and 4 deletions
|
@ -252,9 +252,11 @@ class Commands:
|
|||
for matched_file in matched_files:
|
||||
abs_file_path = os.path.abspath(os.path.join(self.coder.root, matched_file))
|
||||
if abs_file_path not in self.coder.abs_fnames:
|
||||
self.coder.abs_fnames.add(abs_file_path)
|
||||
self.io.tool_output(f"Added {matched_file} to the chat")
|
||||
added_fnames.append(matched_file)
|
||||
content = self.io.read_text(abs_file_path)
|
||||
if content is not None:
|
||||
self.coder.abs_fnames.add(abs_file_path)
|
||||
self.io.tool_output(f"Added {matched_file} to the chat")
|
||||
added_fnames.append(matched_file)
|
||||
else:
|
||||
self.io.tool_error(f"{matched_file} is already in the chat")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue