From 95cb482938b24fa4ac7834e52297ea5999f25d4b Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 4 Jun 2023 14:13:56 -0700 Subject: [PATCH] bugfix --- aider/repomap.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/aider/repomap.py b/aider/repomap.py index d04174c73..2189bdd8b 100644 --- a/aider/repomap.py +++ b/aider/repomap.py @@ -108,11 +108,12 @@ class RepoMap: if self.has_ctags: files_listing = self.get_ranked_tags_map(chat_files, other_files) - num_tokens = self.token_count(files_listing) - if self.io: - self.io.tool_output(f"ctags map: {num_tokens/1024:.1f} k-tokens") - ctags_msg = " with selected ctags info" - return files_listing, ctags_msg + if files_listing: + num_tokens = self.token_count(files_listing) + if self.io: + self.io.tool_output(f"ctags map: {num_tokens/1024:.1f} k-tokens") + ctags_msg = " with selected ctags info" + return files_listing, ctags_msg files_listing = self.get_simple_files_map(other_files) ctags_msg = ""