fix: stop local terminal warning without minisweagent

This commit is contained in:
teknium1
2026-03-13 22:00:36 -07:00
parent 607689095e
commit 329f83ff2d
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