mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
use ~/.aider/caches
This commit is contained in:
parent
3d51102de5
commit
81195dad02
2 changed files with 4 additions and 5 deletions
|
@ -63,7 +63,7 @@ def get_index():
|
|||
)
|
||||
from llama_index.core.node_parser import MarkdownNodeParser
|
||||
|
||||
dname = Path.home() / ".aider" / ("help." + __version__)
|
||||
dname = Path.home() / ".aider" / "caches" / ("help." + __version__)
|
||||
|
||||
if dname.exists():
|
||||
storage_context = StorageContext.from_defaults(
|
||||
|
@ -90,7 +90,7 @@ def get_index():
|
|||
nodes += parser.get_nodes_from_documents([doc])
|
||||
|
||||
index = VectorStoreIndex(nodes, show_progress=True)
|
||||
dname.parent.mkdir(exist_ok=True)
|
||||
dname.parent.mkdir(parents=True, exist_ok=True)
|
||||
index.storage_context.persist(dname)
|
||||
|
||||
return index
|
||||
|
|
|
@ -8,7 +8,7 @@ import aider
|
|||
|
||||
|
||||
def check_version(print_cmd):
|
||||
fname = Path.home() / ".aider/versioncheck"
|
||||
fname = Path.home() / ".aider" / "caches" / "versioncheck"
|
||||
day = 60 * 60 * 24
|
||||
if fname.exists() and time.time() - fname.stat().st_mtime < day:
|
||||
return
|
||||
|
@ -35,8 +35,7 @@ def check_version(print_cmd):
|
|||
else:
|
||||
print_cmd(f"{py} -m pip install --upgrade aider-chat")
|
||||
|
||||
if not fname.parent.exists():
|
||||
fname.parent.mkdir()
|
||||
fname.parent.mkdir(parents=True, exist_ok=True)
|
||||
fname.touch()
|
||||
return is_update_available
|
||||
except Exception as err:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue