feat(gateway): configure Telegram command menu priority - #42021
Closed
thestral123 wants to merge 4 commits into
Closed
feat(gateway): configure Telegram command menu priority#42021thestral123 wants to merge 4 commits into
thestral123 wants to merge 4 commits into
Conversation
This was referenced Jun 10, 2026
# Conflicts: # cli-config.yaml.example # website/docs/user-guide/messaging/telegram.md
teknium1
pushed a commit
that referenced
this pull request
Jun 24, 2026
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.
teknium1
added a commit
that referenced
this pull request
Jun 24, 2026
fsca8
pushed a commit
to fsca8/hermes-agent
that referenced
this pull request
Jun 24, 2026
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 NousResearch#42021. Cherry-picked onto current main; the original edited gateway/platforms/telegram.py, now relocated to plugins/platforms/telegram/adapter.py.
fsca8
pushed a commit
to fsca8/hermes-agent
that referenced
this pull request
Jun 24, 2026
pai-scaffolde
pushed a commit
to pai-scaffolde/hermes-agent
that referenced
this pull request
Jun 28, 2026
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 NousResearch#42021. Cherry-picked onto current main; the original edited gateway/platforms/telegram.py, now relocated to plugins/platforms/telegram/adapter.py.
pai-scaffolde
pushed a commit
to pai-scaffolde/hermes-agent
that referenced
this pull request
Jun 28, 2026
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
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 NousResearch#42021. Cherry-picked onto current main; the original edited gateway/platforms/telegram.py, now relocated to plugins/platforms/telegram/adapter.py.
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
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 NousResearch#42021. Cherry-picked onto current main; the original edited gateway/platforms/telegram.py, now relocated to plugins/platforms/telegram/adapter.py.
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
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 NousResearch#42021. Cherry-picked onto current main; the original edited gateway/platforms/telegram.py, now relocated to plugins/platforms/telegram/adapter.py.
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
This was referenced Jul 13, 2026
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
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 NousResearch#42021. Cherry-picked onto current main; the original edited gateway/platforms/telegram.py, now relocated to plugins/platforms/telegram/adapter.py.
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
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 NousResearch#42021. Cherry-picked onto current main; the original edited gateway/platforms/telegram.py, now relocated to plugins/platforms/telegram/adapter.py.
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
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.
What does this PR do?
This PR makes the Telegram BotCommand menu priority and visible-menu cap configurable from the documented Telegram platform config path:
Telegram command registration currently uses a safe 30-command cap to avoid Telegram's payload-size limits. That preserves reliability, but local/plugin/skill commands can be pushed out of the visible
/picker by built-in defaults. This change keeps the existing default behavior while letting users explicitly prioritize the commands they need visible.The approach is intentionally narrow:
1..100BotCommand limitprepend,append, andreplacepriority modesplatforms.telegram.extra.command_menupath/commandsremains the full listThis overlaps with the user need in #33480 and is related to earlier proposals such as #31099, #34147, #33706, #33484, and #40325. The main difference is that this combines configurable priority and cap under the documented platform
extra.command_menuconfig surface while preserving the safe default behavior.Related Issue
Fixes #33480
Type of Change
Changes Made
hermes_cli/commands.pyplatforms.telegram.extra.command_menumax_commands,priority_mode, andprioritygateway/platforms/telegram.pytests/hermes_cli/test_commands.pyprepend,append, andreplacebehaviormax_commandsdefaults, clamping, invalid values, and ignoring undocumented pathscli-config.yaml.examplewebsite/docs/user-guide/messaging/telegram.md/commandsremains the full listHow to Test
Configure a Telegram command-menu priority list in
~/.hermes/config.yaml:Restart the Telegram gateway so BotCommands are re-registered.
Open Telegram's
/picker and verify the configured command appears before lower-priority defaults.Run the automated checks:
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AVerification performed
The full-suite checkbox is intentionally unchecked. A local rerun of the two gateway repro files that had appeared during broader validation produced:
The remaining local failure is:
That assertion is in Honcho/gateway cache mtime handling and is outside this PR's Telegram command-menu config changes. I also reproduced the same
tests/gateway/test_agent_cache.pyfailure on currentupstream/main(c3055d618), so it is not introduced by this branch.Screenshots / Logs
N/A — this changes Telegram BotCommand registration behavior and config/docs; no UI screenshot is needed.