Improve messaging about universal ctags

This commit is contained in:
Paul Gauthier 2023-06-14 16:12:51 -07:00
parent be34086ac0
commit ce8069196c
2 changed files with 12 additions and 6 deletions

View file

@ -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()
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)