mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
cleanup
This commit is contained in:
parent
40d702abd1
commit
2a1255ed07
1 changed files with 0 additions and 19 deletions
|
@ -71,16 +71,6 @@ def to_tree(tags):
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
||||||
def fname_to_components(fname, with_colon):
|
|
||||||
path_components = fname.split(os.sep)
|
|
||||||
res = [pc + os.sep for pc in path_components[:-1]]
|
|
||||||
if with_colon:
|
|
||||||
res.append(path_components[-1] + ":")
|
|
||||||
else:
|
|
||||||
res.append(path_components[-1])
|
|
||||||
return res
|
|
||||||
|
|
||||||
|
|
||||||
class RepoMap:
|
class RepoMap:
|
||||||
CACHE_VERSION = 2
|
CACHE_VERSION = 2
|
||||||
TAGS_CACHE_DIR = f".aider.tags.cache.v{CACHE_VERSION}"
|
TAGS_CACHE_DIR = f".aider.tags.cache.v{CACHE_VERSION}"
|
||||||
|
@ -141,15 +131,6 @@ class RepoMap:
|
||||||
|
|
||||||
return repo_content
|
return repo_content
|
||||||
|
|
||||||
def get_simple_files_map(self, other_files):
|
|
||||||
fnames = []
|
|
||||||
for fname in other_files:
|
|
||||||
fname = self.get_rel_fname(fname)
|
|
||||||
fname = fname_to_components(fname, False)
|
|
||||||
fnames.append(fname)
|
|
||||||
|
|
||||||
return to_tree(fnames)
|
|
||||||
|
|
||||||
def token_count(self, string):
|
def token_count(self, string):
|
||||||
return len(self.tokenizer.encode(string))
|
return len(self.tokenizer.encode(string))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue