mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
Better progress indicator in large repos
This commit is contained in:
parent
1e232d4db6
commit
75bd6f114c
3 changed files with 11 additions and 7 deletions
|
@ -156,9 +156,9 @@ class Coder:
|
|||
lines.append(f"Git repo: {rel_repo_dir} with {num_files:,} files")
|
||||
if num_files > 1000:
|
||||
lines.append(
|
||||
"Warning: For large repos, consider using an .aiderignore file to ignore"
|
||||
" irrelevant files/dirs."
|
||||
"Warning: For large repos, consider using --subtree-only and .aiderignore"
|
||||
)
|
||||
lines.append(f"See: {urls.large_repos}")
|
||||
else:
|
||||
lines.append("Git repo: none")
|
||||
|
||||
|
|
|
@ -260,10 +260,16 @@ class RepoMap:
|
|||
personalize = 100 / len(fnames)
|
||||
|
||||
if len(fnames) - len(self.TAGS_CACHE) > 100:
|
||||
fnames = tqdm(fnames, desc="Scanning files")
|
||||
self.io.tool_output(
|
||||
"Initial repo scan can be slow in larger repos, but only happens once."
|
||||
)
|
||||
fnames = tqdm(fnames, desc="Scanning repo")
|
||||
showing_bar = True
|
||||
else:
|
||||
showing_bar = False
|
||||
|
||||
for fname in fnames:
|
||||
if progress:
|
||||
if progress and not showing_bar:
|
||||
progress()
|
||||
|
||||
if not Path(fname).is_file():
|
||||
|
@ -293,9 +299,6 @@ class RepoMap:
|
|||
continue
|
||||
|
||||
for tag in tags:
|
||||
if progress:
|
||||
progress()
|
||||
|
||||
if tag.kind == "def":
|
||||
defines[tag.name].add(rel_fname)
|
||||
key = (rel_fname, tag.name)
|
||||
|
|
|
@ -7,3 +7,4 @@ favicon = "https://aider.chat/assets/icons/favicon-32x32.png"
|
|||
model_warnings = "https://aider.chat/docs/llms/warnings.html"
|
||||
token_limits = "https://aider.chat/docs/troubleshooting/token-limits.html"
|
||||
llms = "https://aider.chat/docs/llms.html"
|
||||
large_repos = "https://aider.chat/docs/faq.html#can-i-use-aider-in-a-large-mono-repo"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue