mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
feat: Add a dictionary to cache abs_root_path results
This commit is contained in:
parent
b654a16b48
commit
a864ab9888
1 changed files with 5 additions and 2 deletions
|
@ -71,6 +71,7 @@ class Coder:
|
|||
test_outcome = None
|
||||
multi_response_content = ""
|
||||
rejected_urls = set()
|
||||
abs_root_path_cache = {}
|
||||
|
||||
@classmethod
|
||||
def create(
|
||||
|
@ -397,8 +398,10 @@ class Coder:
|
|||
return True
|
||||
|
||||
def abs_root_path(self, path):
|
||||
if path not in self.abs_root_path_cache:
|
||||
res = Path(self.root) / path
|
||||
return utils.safe_abs_path(res)
|
||||
self.abs_root_path_cache[path] = utils.safe_abs_path(res)
|
||||
return self.abs_root_path_cache[path]
|
||||
|
||||
fences = [
|
||||
("``" + "`", "``" + "`"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue