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")
|
lines.append(f"Git repo: {rel_repo_dir} with {num_files:,} files")
|
||||||
if num_files > 1000:
|
if num_files > 1000:
|
||||||
lines.append(
|
lines.append(
|
||||||
"Warning: For large repos, consider using an .aiderignore file to ignore"
|
"Warning: For large repos, consider using --subtree-only and .aiderignore"
|
||||||
" irrelevant files/dirs."
|
|
||||||
)
|
)
|
||||||
|
lines.append(f"See: {urls.large_repos}")
|
||||||
else:
|
else:
|
||||||
lines.append("Git repo: none")
|
lines.append("Git repo: none")
|
||||||
|
|
||||||
|
|
|
@ -260,10 +260,16 @@ class RepoMap:
|
||||||
personalize = 100 / len(fnames)
|
personalize = 100 / len(fnames)
|
||||||
|
|
||||||
if len(fnames) - len(self.TAGS_CACHE) > 100:
|
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:
|
for fname in fnames:
|
||||||
if progress:
|
if progress and not showing_bar:
|
||||||
progress()
|
progress()
|
||||||
|
|
||||||
if not Path(fname).is_file():
|
if not Path(fname).is_file():
|
||||||
|
@ -293,9 +299,6 @@ class RepoMap:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
if progress:
|
|
||||||
progress()
|
|
||||||
|
|
||||||
if tag.kind == "def":
|
if tag.kind == "def":
|
||||||
defines[tag.name].add(rel_fname)
|
defines[tag.name].add(rel_fname)
|
||||||
key = (rel_fname, tag.name)
|
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"
|
model_warnings = "https://aider.chat/docs/llms/warnings.html"
|
||||||
token_limits = "https://aider.chat/docs/troubleshooting/token-limits.html"
|
token_limits = "https://aider.chat/docs/troubleshooting/token-limits.html"
|
||||||
llms = "https://aider.chat/docs/llms.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