mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-06 07:51:53 +00:00
fix(gateway): prioritize Telegram command menu
This commit is contained in:
parent
1566d71726
commit
b9b6e034d5
2 changed files with 86 additions and 3 deletions
|
|
@ -951,6 +951,30 @@ class TestTelegramMenuCommands:
|
|||
f"Command '{name}' is {len(name)} chars (limit {_TG_NAME_LIMIT})"
|
||||
)
|
||||
|
||||
def test_operational_builtins_survive_thirty_command_cap(self, tmp_path, monkeypatch):
|
||||
(tmp_path / "config.yaml").write_text(
|
||||
"display:\n tool_progress_command: true\n"
|
||||
)
|
||||
monkeypatch.setenv("HERMES_HOME", str(tmp_path))
|
||||
|
||||
menu, hidden = telegram_menu_commands(max_commands=30)
|
||||
names = [name for name, _desc in menu]
|
||||
|
||||
assert len(names) == 30
|
||||
assert hidden > 0
|
||||
for name in (
|
||||
"debug",
|
||||
"restart",
|
||||
"update",
|
||||
"verbose",
|
||||
"commands",
|
||||
"help",
|
||||
"new",
|
||||
"stop",
|
||||
"status",
|
||||
):
|
||||
assert name in names
|
||||
|
||||
def test_includes_plugin_commands_via_lazy_discovery(self, tmp_path, monkeypatch):
|
||||
"""Telegram menu generation should discover plugin slash commands on first access."""
|
||||
from unittest.mock import patch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue