From ad4e1659aa7de6c2be7a4cb4cc7a7d823c82de31 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 10 May 2023 19:31:57 -0700 Subject: [PATCH] better /ls output --- aider/commands.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index 383d8ee19..9feaea58e 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -195,20 +195,21 @@ class Commands: files = self.coder.get_all_relative_files() - self.console.print("[red]Files in chat:\n") - other_files = [] + chat_files = [] for file in files: abs_file_path = os.path.abspath(os.path.join(self.coder.root, file)) if abs_file_path in self.coder.abs_fnames: - self.console.print(f"[red] {file}") + chat_files.append(file) else: other_files.append(file) - if not other_files: - return - - self.console.print("\n[red]Other repo files:\n") + if chat_files: + self.console.print("[red]Files in chat:\n") + for file in chat_files: + self.console.print(f"[red] {file}") + if other_files: + self.console.print("\n[red]Repo files not in the chat:\n") for file in other_files: self.console.print(f"[red] {file}")