mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
Improve messaging about universal ctags
This commit is contained in:
parent
be34086ac0
commit
ce8069196c
2 changed files with 12 additions and 6 deletions
|
@ -117,8 +117,12 @@ class Coder:
|
|||
self.gpt_prompts.repo_content_prefix,
|
||||
)
|
||||
|
||||
if self.repo_map.has_ctags:
|
||||
self.io.tool_output("Using ctags to build repo-map.")
|
||||
if self.repo_map.use_ctags:
|
||||
self.io.tool_output("Using universal-ctags to build repo-map.")
|
||||
elif not self.repo_map.has_ctags and map_tokens > 0:
|
||||
self.io.tool_output("Can't find universal-ctags, using basic repo-map.")
|
||||
else:
|
||||
self.io.tool_output("Not using repo map.")
|
||||
|
||||
for fname in self.get_inchat_relative_files():
|
||||
self.io.tool_output(f"Added {fname} to the chat.")
|
||||
|
|
|
@ -83,10 +83,12 @@ class RepoMap:
|
|||
self.load_tags_cache()
|
||||
|
||||
self.max_map_tokens = map_tokens
|
||||
if map_tokens > 0:
|
||||
self.has_ctags = self.check_for_ctags()
|
||||
|
||||
if map_tokens > 0 and self.has_ctags:
|
||||
self.use_ctags = True
|
||||
else:
|
||||
self.has_ctags = False
|
||||
self.use_ctags = False
|
||||
|
||||
self.tokenizer = tiktoken.encoding_for_model(main_model.name)
|
||||
self.repo_content_prefix = repo_content_prefix
|
||||
|
@ -122,7 +124,7 @@ class RepoMap:
|
|||
if not other_files:
|
||||
return
|
||||
|
||||
if self.has_ctags:
|
||||
if self.use_ctags:
|
||||
files_listing = self.get_ranked_tags_map(chat_files, other_files)
|
||||
if files_listing:
|
||||
num_tokens = self.token_count(files_listing)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue