feat(telegram): configurable command menu + raise default cap so skills stay visible - #51716
Merged
Conversation
Contributor
🔎 Lint report:
|
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
force-pushed
the
hermes/hermes-45a2734c
branch
from
June 24, 2026 06:40
a264361 to
33d6b4b
Compare
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.py—platforms.telegram.extra.command_menuconfig parsing (max_commandsclamped 1..100,priority_modeprepend/append/replace,prioritylist); 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
/learnin/menuE2E: installed a fake
/learnskill against a tempHERMES_HOME, built the real menu viatelegram_menu_commands(). At cap=30 →learn_visible=False; at the new default 60 → all 50 built-ins +learnfit,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