fix(telegram): raise command menu cap from 30 to 100 so plugin commands appear - #33484
Closed
liuhao1024 wants to merge 2 commits into
Closed
fix(telegram): raise command menu cap from 30 to 100 so plugin commands appear#33484liuhao1024 wants to merge 2 commits into
liuhao1024 wants to merge 2 commits into
Conversation
…ds appear Fixes NousResearch#33480 MAX_COMMANDS_PER_SCOPE was hardcoded to 30, which caused all plugin slash commands to be truncated from the Telegram bot menu. Built-in commands fill 22 priority-0 slots, leaving only 8 for remaining commands — plugin commands (priority 1) were always pushed out. Telegram's Bot API officially supports up to 100 commands via setMyCommands. Raise the cap to 100 so plugin and skill commands are included in the menu alongside built-ins. Also fixes the log message to reference MAX_COMMANDS_PER_SCOPE instead of the hardcoded literal 30.
19 tasks
Contributor
|
Thanks for isolating the Telegram command-menu truncation problem. Automated hermes-sweeper review found this is already implemented on current
The PR's target was also relocated from |
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?
Raise
MAX_COMMANDS_PER_SCOPEfrom 30 to 100 so that plugin slash commands appear in the Telegram bot menu.Related Issue
Fixes #33480
Type of Change
Changes Made
gateway/platforms/telegram.py: RaiseMAX_COMMANDS_PER_SCOPEfrom 30 to 100; update comment; fix hardcoded30in log message to referenceMAX_COMMANDS_PER_SCOPEtests/hermes_cli/test_commands.py: Add regression testtest_plugin_commands_survive_hundred_command_capHow to Test
pytest tests/ -q— all tests should passChecklist
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 and workflows — or N/ACode Intelligence
gateway/platforms/telegram.py:MAX_COMMANDS_PER_SCOPE(callers: 2 —set_my_commandsat line 1579,_ensure_forum_commandsat line 4784)hermes_cli/commands.py:telegram_menu_commands(defaultmax_commands=100, priority logic in_prioritize_telegram_menu_commands)_TELEGRAM_MENU_PRIORITY(22 built-in commands at priority 0),_prioritize_telegram_menu_commands(sorts by priority)Checklist
TestTelegramMenuCommands— 8/8 passed)