Skip to content

Commit cee4f8a

Browse files
committed
add repo number in display bar
1 parent feeefa1 commit cee4f8a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

agent/display.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ def render(self, task: Task) -> Text:
3838
return Text(f"{int(task.completed or 0)}/{int(task.total or 1)}")
3939

4040

41+
class RepoCountColumn(ProgressColumn):
42+
"""Custom progress column for displaying the count of finished repositories."""
43+
44+
def render(self, task: Task) -> Text:
45+
"""Render the count of finished repositories."""
46+
return Text(f"{int(task.completed or 0)}/{int(task.total or 1)}")
47+
48+
4149
class OngoingRepo:
4250
def __init__(
4351
self, name: str, current_file: str, finished_files: list[str], total_files: int
@@ -90,6 +98,7 @@ def __init__(self, total_repos: int):
9098
self.overall_progress = Progress(
9199
SpinnerColumn(),
92100
BarColumn(bar_width=None),
101+
RepoCountColumn(),
93102
TextColumn("[progress.percentage]{task.percentage:>3.0f}%"),
94103
)
95104
self.overall_task = self.overall_progress.add_task(

0 commit comments

Comments
 (0)