feat: Add force_refresh option to get_repo_map method

This commit is contained in:
Paul Gauthier 2024-08-18 13:07:38 -07:00 committed by Paul Gauthier (aider)
parent 5099a5c24b
commit ded270ee8b
2 changed files with 3 additions and 4 deletions

View file

@ -613,7 +613,7 @@ class Coder:
return matches
def get_repo_map(self):
def get_repo_map(self, force_refresh=False):
if not self.repo_map:
return
@ -633,6 +633,7 @@ class Coder:
other_files,
mentioned_fnames=mentioned_fnames,
mentioned_idents=mentioned_idents,
force_refresh=force_refresh,
)
# fall back to global repo map if files in chat are disjoint from rest of repo

View file

@ -1049,9 +1049,7 @@ class Commands:
"Force a refresh of the repository map and print it out"
repo_map = self.coder.get_repo_map(force_refresh=True)
if repo_map:
self.io.tool_output(repo_map)
else:
self.io.tool_output("No repository map available.")
self.io.tool_output("The repo map has been refreshed, use /map to view it.")
def expand_subdir(file_path):