mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
refactor: consolidate ~/.hermes directory layout with backward compat (#3610)
New installs get a cleaner structure: cache/images/ (was image_cache/) cache/audio/ (was audio_cache/) cache/documents/ (was document_cache/) cache/screenshots/ (was browser_screenshots/) platforms/whatsapp/session/ (was whatsapp/session/) platforms/matrix/store/ (was matrix/store/) platforms/pairing/ (was pairing/) Existing installs are unaffected -- get_hermes_dir() checks for the old path first and uses it if present. No migration needed. Adds get_hermes_dir(new_subpath, old_name) helper to hermes_constants.py for reuse by any future subsystem.
This commit is contained in:
parent
614e43d3d9
commit
1e924e99b9
7 changed files with 40 additions and 13 deletions
|
|
@ -1523,8 +1523,8 @@ def browser_vision(question: str, annotate: bool = False, task_id: Optional[str]
|
|||
effective_task_id = task_id or "default"
|
||||
|
||||
# Save screenshot to persistent location so it can be shared with users
|
||||
hermes_home = Path(os.environ.get("HERMES_HOME", Path.home() / ".hermes"))
|
||||
screenshots_dir = hermes_home / "browser_screenshots"
|
||||
from hermes_constants import get_hermes_dir
|
||||
screenshots_dir = get_hermes_dir("cache/screenshots", "browser_screenshots")
|
||||
screenshot_path = screenshots_dir / f"browser_screenshot_{uuid_mod.uuid4().hex}.png"
|
||||
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue