mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
add helpful warnings on launch
This commit is contained in:
parent
a279adc5fc
commit
cc3da03a0b
1 changed files with 11 additions and 0 deletions
|
@ -182,6 +182,11 @@ class Coder:
|
||||||
rel_repo_dir = self.repo.get_rel_repo_dir()
|
rel_repo_dir = self.repo.get_rel_repo_dir()
|
||||||
num_files = len(self.repo.get_tracked_files())
|
num_files = len(self.repo.get_tracked_files())
|
||||||
self.io.tool_output(f"Git repo: {rel_repo_dir} with {num_files:,} files")
|
self.io.tool_output(f"Git repo: {rel_repo_dir} with {num_files:,} files")
|
||||||
|
if num_files > 1000:
|
||||||
|
self.io.tool_error(
|
||||||
|
"Warning: For large repos, consider using an .aiderignore file to ignore"
|
||||||
|
" irrelevant files/dirs."
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
self.io.tool_output("Git repo: none")
|
self.io.tool_output("Git repo: none")
|
||||||
self.find_common_root()
|
self.find_common_root()
|
||||||
|
@ -198,6 +203,12 @@ class Coder:
|
||||||
|
|
||||||
if map_tokens > 0:
|
if map_tokens > 0:
|
||||||
self.io.tool_output(f"Repo-map: using {map_tokens} tokens")
|
self.io.tool_output(f"Repo-map: using {map_tokens} tokens")
|
||||||
|
max_map_tokens = 2048
|
||||||
|
if map_tokens > max_map_tokens:
|
||||||
|
self.io.tool_error(
|
||||||
|
f"Warning: map-tokens > {max_map_tokens} is not recommended as too much"
|
||||||
|
" irrelevant code can confused GPT."
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
self.io.tool_output("Repo-map: disabled because map_tokens == 0")
|
self.io.tool_output("Repo-map: disabled because map_tokens == 0")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue