From d41ae9d8b7ac08637bd571ee556fce48fb3a92c1 Mon Sep 17 00:00:00 2001 From: "Amir Elaguizy (aider)" Date: Sat, 10 Aug 2024 16:09:50 -0500 Subject: [PATCH] feat: Add read-only files to the output of the 'ls' command --- aider/commands.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index 94af9e380..230c3c71f 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -752,6 +752,7 @@ class Commands: other_files = [] chat_files = [] + read_only_files = [] for file in files: abs_file_path = self.coder.abs_root_path(file) if abs_file_path in self.coder.abs_fnames: @@ -759,8 +760,13 @@ class Commands: else: other_files.append(file) - if not chat_files and not other_files: - self.io.tool_output("\nNo files in chat or git repo.") + # Add read-only files + for abs_file_path in self.coder.abs_read_only_fnames: + rel_file_path = self.coder.get_rel_fname(abs_file_path) + read_only_files.append(rel_file_path) + + if not chat_files and not other_files and not read_only_files: + self.io.tool_output("\nNo files in chat, git repo, or read-only list.") return if other_files: @@ -768,6 +774,11 @@ class Commands: for file in other_files: self.io.tool_output(f" {file}") + if read_only_files: + self.io.tool_output("\nRead-only files:\n") + for file in read_only_files: + self.io.tool_output(f" {file}") + if chat_files: self.io.tool_output("\nFiles in chat:\n") for file in chat_files: