fix: Display shorter path for readonly files

This commit is contained in:
Paul Gauthier 2024-12-26 10:48:04 -05:00 committed by Paul Gauthier (aider)
parent acc4893a7f
commit 6bfd89074c

View file

@ -913,6 +913,7 @@ class InputOutput:
editable_files = [f for f in sorted(rel_fnames) if f not in rel_read_only_fnames] editable_files = [f for f in sorted(rel_fnames) if f not in rel_read_only_fnames]
if read_only_files: if read_only_files:
# for each ro file display the abs path if it is shorter than the rel ai!
files_with_label = ["Readonly:"] + read_only_files files_with_label = ["Readonly:"] + read_only_files
read_only_output = StringIO() read_only_output = StringIO()
Console(file=read_only_output, force_terminal=False).print(Columns(files_with_label)) Console(file=read_only_output, force_terminal=False).print(Columns(files_with_label))