feat: support configurable Telegram command menu - #43162
Conversation
Duplicate of #42021 — same goal (work around Telegram's BotCommand menu cap so plugin/skill commands stay visible). #42021 offers the more comprehensive configurable surface (cap + prepend/append/replace + priority list). Also competes with #31099 and builds on merged #29585. Marking as duplicate of the most comprehensive open PR; maintainer to choose. |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for targeting the real remaining gap: current main’s configurable priority can promote built-in/plugin entries, but it does not elevate skills collected after the cap calculation (hermes_cli/commands.py:911-926).
Problems
- The new resolver reads
gateway.telegram_pinned_commands/gateway.telegram_hidden_commands(hermes_cli/commands.py:460-464in this PR). Current Hermes documents and readsplatforms.telegram.extra.command_menu(hermes_cli/commands.py:600-614;website/docs/user-guide/messaging/telegram.md:82-105), so this would introduce a second, undocumented config contract. - The PR does not update the configuration example or Telegram documentation for its new user-facing keys.
Suggested changes
- Integrate pin/exclusion behavior into the existing
platforms.telegram.extra.command_menuparser and order all eligible candidates before applying the cap, so a pinned skill can survive it. - Preserve the current sanitization, collision filtering, disabled-skill filtering, and registration path (
plugins/platforms/telegram/adapter.py:2944-2946), and add canonical-path tests plus docs/example updates.
Automated hermes-sweeper review.
| cfg = read_raw_config() | ||
| except Exception: | ||
| cfg = {} | ||
| gateway = cfg.get("gateway") if isinstance(cfg, dict) else None |
There was a problem hiding this comment.
Please extend the established platforms.telegram.extra.command_menu configuration instead of introducing gateway.telegram_*. Current main reads and documents that canonical path in hermes_cli/commands.py:600-614 and website/docs/user-guide/messaging/telegram.md:82-105; a second namespace would be undocumented and inconsistent.
PR Draft: Configurable Telegram command menu pinning/hiding
Title
feat: support configurable Telegram command menu
Summary
gateway.telegram_pinned_commandsandgateway.telegram_hidden_commandshermes config set gateway.telegram_pinned_commands.0 ...Why
Telegram's visible BotCommand menu is capped. Profiles can have valid slash commands that dispatch correctly but are omitted from the visible menu because lower-priority commands filled the cap first. Users running multiple Hermes profiles need profile-local command visibility without hardcoding profile-specific preferences into shared source.
Tests
Local verification
Notes
This PR intentionally does not add Samus/Kim-specific commands to the global registry. It provides a generic config surface that profiles can use independently.