Skip to content

fix(cli): prioritize plugin commands above skills in Telegram menu - #33706

Closed
Linux2010 wants to merge 1 commit into
NousResearch:mainfrom
Linux2010:fix/telegram-command-cap-plugins-33480
Closed

fix(cli): prioritize plugin commands above skills in Telegram menu#33706
Linux2010 wants to merge 1 commit into
NousResearch:mainfrom
Linux2010:fix/telegram-command-cap-plugins-33480

Conversation

@Linux2010

Copy link
Copy Markdown
Contributor

Summary

Fixes #33480 — Plugin slash commands were invisible in Telegram's command menu due to being truncated by the 30-command cap alongside skill commands.

Problem

  • _prioritize_telegram_menu_commands gave plugin commands priority 1 (same as skills)
  • With ~48 total commands and a 30-command cap, plugins were pushed beyond position 30
  • User-installed plugins never appeared in Telegram's / autocomplete menu

Fix

Modified _prioritize_telegram_menu_commands to give plugin commands middle priority:

  • Priority 0: Core built-in commands (/new, /help, /status, etc.) — always visible
  • Priority 1: Plugin commands — visible when slots remain after core commands
  • Priority 2: Skill commands — fill remaining slots

Testing

Before: Plugin commands truncated at cap, invisible in menu
After: Plugin commands survive cap, appear before skills in menu

# Verify priority order
from hermes_cli.commands import telegram_menu_commands
menu, hidden = telegram_menu_commands(max_commands=30)
# Plugin commands now appear in first 30 slots (if < 12 core commands)

🤖 Generated with Claude Code

Plugin slash commands were being truncated by the 30-command cap
because they received the same priority (1) as skill commands.
When total commands exceeded 30, plugins were pushed out along
with skills, making user-installed plugins invisible in the menu.

Fix: Give plugin commands middle priority (1) in
`_prioritize_telegram_menu_commands`, above skills (priority 2)
but below core built-in commands (priority 0).

Now the priority order is:
1. Core built-in commands (highest) — always visible
2. Plugin commands — visible when slots remain after core
3. Skill commands — fill remaining slots

Fixes NousResearch#33480
@Linux2010
Linux2010 force-pushed the fix/telegram-command-cap-plugins-33480 branch from 157ebba to 01643ea Compare May 28, 2026 06:44
@alt-glitch alt-glitch added type/bug Something isn't working 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 May 28, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Competing fix for #33480 alongside PR #33484 (raises cap from 30→100) and PR #31099 (configurable priority). This PR takes a different approach: reordering priorities rather than raising the cap.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused Telegram-menu fix.

Automated hermes-sweeper review found the requested behavior is already implemented on current main:

  • hermes_cli/commands.py:806-887 collects plugin commands before skills and trims only skills when slots are exhausted.
  • hermes_cli/commands.py:894-926 uses that collector for Telegram menus and documents the Core → Plugin → Skill ordering.
  • d4be583d986f7bcca4f8414fd21ef9e34b18c948 raised the default menu cap from 30 to 60; this shipped in v2026.7.1.
  • dbe14ce35d9cb087ae9fe3e3f166f6c475297e25 also added documented platforms.telegram.extra.command_menu cap and priority configuration, with coverage at tests/hermes_cli/test_commands.py:1250-1283 for prioritizing a plugin in a 30-command menu.

This also supersedes the competing-priority context noted in the earlier discussion and PR #42021. Closing as implemented on main.

@teknium1 teknium1 closed this Jul 13, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 13, 2026
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 sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Plugin slash commands truncated by 30-command cap in Telegram menu

3 participants