mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
refactor: Improve file list display logic with line-based spacing
This commit is contained in:
parent
0dff51920e
commit
8a05f05bd4
1 changed files with 12 additions and 2 deletions
14
aider/io.py
14
aider/io.py
|
@ -733,10 +733,20 @@ class InputOutput:
|
||||||
|
|
||||||
if read_only_files:
|
if read_only_files:
|
||||||
files_with_label = ["Read only:"] + read_only_files
|
files_with_label = ["Read only:"] + read_only_files
|
||||||
|
read_only_output = StringIO()
|
||||||
|
Console(file=read_only_output, force_terminal=False).print(Columns(files_with_label))
|
||||||
|
read_only_lines = read_only_output.getvalue().splitlines()
|
||||||
console.print(Columns(files_with_label))
|
console.print(Columns(files_with_label))
|
||||||
|
|
||||||
if editable_files:
|
if editable_files:
|
||||||
if read_only_files and (len(read_only_files) > 1 or len(editable_files) > 1):
|
if read_only_files:
|
||||||
console.print()
|
files_with_label = ["Editable:"] + editable_files
|
||||||
|
editable_output = StringIO()
|
||||||
|
Console(file=editable_output, force_terminal=False).print(Columns(files_with_label))
|
||||||
|
editable_lines = editable_output.getvalue().splitlines()
|
||||||
|
|
||||||
|
if len(read_only_lines) > 1 or len(editable_lines) > 1:
|
||||||
|
console.print()
|
||||||
files_with_label = ["Editable:"] + editable_files
|
files_with_label = ["Editable:"] + editable_files
|
||||||
console.print(Columns(files_with_label))
|
console.print(Columns(files_with_label))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue