mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
refactor: refactor 'Updating repo map' text to constant
This commit is contained in:
parent
11480f6110
commit
b9885bb76d
1 changed files with 6 additions and 4 deletions
|
@ -35,6 +35,8 @@ CACHE_VERSION = 3
|
||||||
if USING_TSL_PACK:
|
if USING_TSL_PACK:
|
||||||
CACHE_VERSION = 4
|
CACHE_VERSION = 4
|
||||||
|
|
||||||
|
UPDATING_REPO_MAP_MESSAGE = "Updating repo map"
|
||||||
|
|
||||||
|
|
||||||
class RepoMap:
|
class RepoMap:
|
||||||
TAGS_CACHE_DIR = f".aider.tags.cache.v{CACHE_VERSION}"
|
TAGS_CACHE_DIR = f".aider.tags.cache.v{CACHE_VERSION}"
|
||||||
|
@ -380,7 +382,7 @@ class RepoMap:
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
self.io.tool_output(f"Processing {fname}")
|
self.io.tool_output(f"Processing {fname}")
|
||||||
if progress and not showing_bar:
|
if progress and not showing_bar:
|
||||||
progress("Updating repo map: " + fname)
|
progress(f"{UPDATING_REPO_MAP_MESSAGE}: {fname}")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
file_ok = Path(fname).is_file()
|
file_ok = Path(fname).is_file()
|
||||||
|
@ -459,7 +461,7 @@ class RepoMap:
|
||||||
|
|
||||||
for ident in idents:
|
for ident in idents:
|
||||||
if progress:
|
if progress:
|
||||||
progress("Updating repo map: " + ident)
|
progress(f"{UPDATING_REPO_MAP_MESSAGE}: {ident}")
|
||||||
|
|
||||||
definers = defines[ident]
|
definers = defines[ident]
|
||||||
|
|
||||||
|
@ -512,7 +514,7 @@ class RepoMap:
|
||||||
ranked_definitions = defaultdict(float)
|
ranked_definitions = defaultdict(float)
|
||||||
for src in G.nodes:
|
for src in G.nodes:
|
||||||
if progress:
|
if progress:
|
||||||
progress("Updating repo map: " + src)
|
progress(f"{UPDATING_REPO_MAP_MESSAGE}: {src}")
|
||||||
|
|
||||||
src_rank = ranked[src]
|
src_rank = ranked[src]
|
||||||
total_weight = sum(data["weight"] for _src, _dst, data in G.out_edges(src, data=True))
|
total_weight = sum(data["weight"] for _src, _dst, data in G.out_edges(src, data=True))
|
||||||
|
@ -621,7 +623,7 @@ class RepoMap:
|
||||||
if not mentioned_idents:
|
if not mentioned_idents:
|
||||||
mentioned_idents = set()
|
mentioned_idents = set()
|
||||||
|
|
||||||
spin = Spinner("Updating repo map")
|
spin = Spinner(UPDATING_REPO_MAP_MESSAGE)
|
||||||
|
|
||||||
ranked_tags = self.get_ranked_tags(
|
ranked_tags = self.get_ranked_tags(
|
||||||
chat_fnames,
|
chat_fnames,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue