Merge pull request #1239 from NousResearch/hermes/hermes-07d947aa

fix: stop local terminal warning without minisweagent
This commit is contained in:
Teknium 2026-03-13 22:14:44 -07:00 committed by GitHub
commit 21422dba44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 1 deletions

View file

@ -0,0 +1,15 @@
import logging
from tools.terminal_tool import check_terminal_requirements
def test_local_terminal_requirements_do_not_depend_on_minisweagent(monkeypatch, caplog):
"""Local backend uses Hermes' own LocalEnvironment wrapper and should not
be marked unavailable just because `minisweagent` isn't importable."""
monkeypatch.setenv("TERMINAL_ENV", "local")
with caplog.at_level(logging.ERROR):
ok = check_terminal_requirements()
assert ok is True
assert "Terminal requirements check failed" not in caplog.text

View file

@ -1130,7 +1130,8 @@ def check_terminal_requirements() -> bool:
try:
if env_type == "local":
from minisweagent.environments.local import LocalEnvironment
# Local execution uses Hermes' own LocalEnvironment wrapper and does
# not depend on minisweagent being importable.
return True
elif env_type == "docker":
from minisweagent.environments.docker import DockerEnvironment