Skip to content

feat(telegram): configurable command menu + raise default cap so skills stay visible - #51716

Merged
teknium1 merged 3 commits into
mainfrom
hermes/hermes-45a2734c
Jun 24, 2026
Merged

feat(telegram): configurable command menu + raise default cap so skills stay visible#51716
teknium1 merged 3 commits into
mainfrom
hermes/hermes-45a2734c

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Skill commands (e.g. a user's /learn) now appear in Telegram's / menu out of the box, and users can configure the menu cap + priority.

Root cause: the Telegram BotCommand menu was capped at 30 while Hermes ships ~50 built-in commands. Built-ins fill the menu first and were themselves trimmed at 30 — so 0 slots were ever left for skill commands, regardless of name or hub status. They still worked when typed manually but never showed in the / picker.

Salvaged from #42021 (@thestral123), which added the configurable cap/priority, plus a follow-up raising the default so the common case works without any config.

Changes

  • hermes_cli/commands.pyplatforms.telegram.extra.command_menu config parsing (max_commands clamped 1..100, priority_mode prepend/append/replace, priority list); default cap raised 30 → 60.
  • plugins/platforms/telegram/adapter.py — registers BotCommands using the configured cap (both default and chat-scoped/forum paths).
  • cli-config.yaml.example, website/docs/.../telegram.md — document the config block and the 60 default.
  • tests/hermes_cli/test_commands.py — priority modes, clamping, invalid values, undocumented-path rejection, default fallback.
  • scripts/release.py — AUTHOR_MAP entry for @thestral123.

Validation

Default cap /learn in / menu Hidden
Before 30 ✗ (no slots for skills) 21
After 60 0

E2E: installed a fake /learn skill against a temp HERMES_HOME, built the real menu via telegram_menu_commands(). At cap=30 → learn_visible=False; at the new default 60 → all 50 built-ins + learn fit, learn_visible=True, 0 hidden. scripts/run_tests.sh tests/hermes_cli/test_commands.py → 161 passed.

Default stays under Telegram's ~4KB payload limit; users can still tune via max_commands.

Closes #42021 (salvaged with @thestral123's authorship preserved).

Infographic

telegram-command-menu-fix

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-45a2734c vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11173 on HEAD, 11173 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5900 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

thestral123 and others added 3 commits June 23, 2026 23:40
Adds a configurable Telegram BotCommand menu cap and priority list via
platforms.telegram.extra.command_menu (max_commands clamped 1..100;
priority_mode prepend|append|replace). Default cap stays 30; hidden
commands remain invokable when typed and /commands lists the full set.

Salvaged from PR #42021. Cherry-picked onto current main; the original
edited gateway/platforms/telegram.py, now relocated to
plugins/platforms/telegram/adapter.py.
…sible

The 30-slot default could not fit Hermes's ~50 built-in commands, so
every skill command (and 20 built-ins) were silently dropped from the
Telegram \`/\` menu by default — they only worked when typed manually.
Raising the default to 60 keeps all built-ins plus common skill commands
visible out of the box while staying under Telegram's ~4KB payload limit.
Users can still tune it via platforms.telegram.extra.command_menu.
@teknium1
teknium1 force-pushed the hermes/hermes-45a2734c branch from a264361 to 33d6b4b Compare June 24, 2026 06:40
@alt-glitch alt-glitch added type/feature New feature or request comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins platform/telegram Telegram bot adapter P3 Low — cosmetic, nice to have labels Jun 24, 2026
@teknium1
teknium1 merged commit 3dfbc0a into main Jun 24, 2026
27 checks passed
@teknium1
teknium1 deleted the hermes/hermes-45a2734c branch June 24, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have platform/telegram Telegram bot adapter type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants