From bcf781da739ce6b333e99902f19754a57d31eec5 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 24 Oct 2024 13:48:32 -0700 Subject: [PATCH] feat: sort file lists alphabetically in format_files_for_input --- aider/io.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/aider/io.py b/aider/io.py index 0fc9e39f3..bfd374ad0 100644 --- a/aider/io.py +++ b/aider/io.py @@ -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}")