fix(gateway): use profile-aware Hermes paths in runtime hints

This commit is contained in:
Xowiek 2026-04-15 22:27:36 +03:00 committed by Teknium
parent 5ef0fe1665
commit 77435c4f13
5 changed files with 34 additions and 3 deletions

View file

@ -144,6 +144,18 @@ class TestGatewayPersonalityNone:
assert "none" in result.lower()
@pytest.mark.asyncio
async def test_empty_personality_list_uses_profile_display_path(self, tmp_path):
runner = self._make_runner(personalities={})
(tmp_path / "config.yaml").write_text(yaml.dump({"agent": {"personalities": {}}}))
with patch("gateway.run._hermes_home", tmp_path), \
patch("hermes_constants.display_hermes_home", return_value="~/.hermes/profiles/coder"):
event = self._make_event("")
result = await runner._handle_personality_command(event)
assert result == "No personalities configured in `~/.hermes/profiles/coder/config.yaml`"
class TestPersonalityDictFormat:
"""Test dict-format custom personalities with description, tone, style."""