refactor: Update file addition confirmation message and add TimeoutError to git error handling

This commit is contained in:
Paul Gauthier 2025-02-06 14:15:09 -08:00 committed by Paul Gauthier (aider)
parent 390bb1bdc5
commit 229e8e1ad1
2 changed files with 4 additions and 1 deletions

View file

@ -1597,7 +1597,9 @@ class Coder:
added_fnames = []
group = ConfirmGroup(new_mentions)
for rel_fname in sorted(new_mentions):
if self.io.confirm_ask(f"Add {rel_fname} to the chat?", group=group, allow_never=True):
if self.io.confirm_ask(
f"Add file to the chat?", subject=rel_fname, group=group, allow_never=True
):
self.add_rel_fname(rel_fname)
added_fnames.append(rel_fname)
else:

View file

@ -28,6 +28,7 @@ ANY_GIT_ERROR += [
ValueError,
AttributeError,
AssertionError,
TimeoutError,
]
ANY_GIT_ERROR = tuple(ANY_GIT_ERROR)