mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-27 15:55:00 +00:00
fixed commands to deal with optional repo map
This commit is contained in:
parent
c8beac9a2d
commit
cf3bf998dd
1 changed files with 5 additions and 4 deletions
|
@ -109,10 +109,11 @@ class Commands:
|
|||
|
||||
# repo map
|
||||
other_files = set(self.coder.get_all_abs_files()) - set(self.coder.abs_fnames)
|
||||
repo_content = self.coder.repo_map.get_repo_map(self.coder.abs_fnames, other_files)
|
||||
if repo_content:
|
||||
tokens = len(self.tokenizer.encode(repo_content))
|
||||
res.append((tokens, "repository map"))
|
||||
if self.coder.repo_map:
|
||||
repo_content = self.coder.repo_map.get_repo_map(self.coder.abs_fnames, other_files)
|
||||
if repo_content:
|
||||
tokens = len(self.tokenizer.encode(repo_content))
|
||||
res.append((tokens, "repository map"))
|
||||
|
||||
# files
|
||||
for fname in self.coder.abs_fnames:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue