Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions aider/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,10 @@ def glob_filtered_to_repo(self, pattern):
def cmd_add(self, args):
"Add files to the chat so aider can edit them or review them in detail"

from aider import prompts

all_matched_files = set()
added_fnames = []

filenames = parse_quoted_filenames(args)
for word in filenames:
Expand Down Expand Up @@ -880,6 +883,7 @@ def cmd_add(self, args):
self.io.tool_output(
f"Moved {matched_file} from read-only to editable files in the chat"
)
added_fnames.append(matched_file)
else:
self.io.tool_error(
f"Cannot add {matched_file} as it's not part of the repository"
Expand All @@ -901,6 +905,10 @@ def cmd_add(self, args):
fname = self.coder.get_rel_fname(abs_file_path)
self.io.tool_output(f"Added {fname} to the chat")
self.coder.check_added_files()
added_fnames.append(fname)

if added_fnames:
return prompts.added_files.format(fnames=", ".join(added_fnames))

def completions_drop(self):
files = self.coder.get_inchat_relative_files()
Expand Down