feat: sort file lists alphabetically in format_files_for_input

This commit is contained in:
Paul Gauthier (aider) 2024-10-24 13:48:32 -07:00
parent a68178fd1b
commit bcf781da73

View file

@ -699,15 +699,13 @@ class InputOutput:
)
self.chat_history_file = None # Disable further attempts to write
### sort the files! @ai (and also remove this text)
def format_files_for_input(self, rel_fnames, rel_read_only_fnames):
read_only_files = []
for full_path in rel_read_only_fnames or []:
for full_path in sorted(rel_read_only_fnames or []):
read_only_files.append(f"{full_path} (read only)")
editable_files = []
for full_path in rel_fnames:
for full_path in sorted(rel_fnames):
if full_path in rel_read_only_fnames:
continue
editable_files.append(f"{full_path}")