mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-11 07:04:59 +00:00
working test
This commit is contained in:
parent
391088fd14
commit
3c443d68d0
3 changed files with 38 additions and 2 deletions
|
@ -290,9 +290,10 @@ class Coder:
|
|||
def get_abs_fnames_content(self):
|
||||
for fname in list(self.abs_fnames):
|
||||
content = self.io.read_text(fname)
|
||||
dump(fname, content)
|
||||
if content is None:
|
||||
relative_fname = self.get_rel_fname(fname)
|
||||
self.tool_error(f"Dropping {relative_fname} from the chat.")
|
||||
self.io.tool_error(f"Dropping {relative_fname} from the chat.")
|
||||
self.abs_fnames.remove(fname)
|
||||
else:
|
||||
yield fname, content
|
||||
|
|
|
@ -141,7 +141,10 @@ class InputOutput:
|
|||
try:
|
||||
with open(str(filename), "r", encoding=self.encoding) as f:
|
||||
return f.read()
|
||||
except (FileNotFoundError, UnicodeError) as e:
|
||||
except FileNotFoundError:
|
||||
self.tool_error(f"{filename}: file not found error")
|
||||
return
|
||||
except UnicodeError as e:
|
||||
self.tool_error(f"{filename}: {e}")
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue