Skip to content

fix(discord): stop truncating flat /skill autocomplete catalog#11804

Closed
Junass1 wants to merge 1 commit into
NousResearch:mainfrom
Junass1:fix/discord-skill-autocomplete-limits
Closed

fix(discord): stop truncating flat /skill autocomplete catalog#11804
Junass1 wants to merge 1 commit into
NousResearch:mainfrom
Junass1:fix/discord-skill-autocomplete-limits

Conversation

@Junass1

@Junass1 Junass1 commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix Discord's flat /skill autocomplete path so it no longer inherits the old category-group cap.

Previously, the Discord adapter switched to a flat autocomplete-based /skill command, but still populated it through the legacy category collector. That meant skills could still be silently hidden once the catalog exceeded the old 25 groups × 25 skills shape. Long skill names also risked losing their original cmd_key binding after name clamping.

What changed

  • added discord_skill_autocomplete_entries() for the flat Discord /skill UI
  • updated the Discord adapter to use the flat collector directly
  • preserved cmd_key when clamping long skill names via _clamp_command_triples()
  • added regression coverage for:
    • long-name clamp preserving dispatchability
    • flat autocomplete no longer enforcing the legacy same-category cap

Why this is correct

The flat /skill command uses Discord autocomplete rather than registered subcommand groups, so it should not be constrained by the old grouped-command structural limits. This change keeps the existing filtering rules (disabled skills, hub exclusion, reserved-name handling, name clamping) while removing the obsolete cap from the autocomplete path.

Testing

  • tests/hermes_cli/test_commands.py — 110 passed
  • tests/gateway/test_discord_slash_commands.py — 30 passed

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists platform/discord Discord bot adapter comp/tools Tool registry, model_tools, toolsets tool/skills Skills system (list, view, manage) labels Apr 24, 2026
@kshitijk4poor

Copy link
Copy Markdown
Collaborator

The underlying cmd_key preservation bug was fixed in PR #19162 (salvaged from #18951 by @CharlieKerfoot). Your PR's discord_skill_autocomplete_entries() wrapper that bypasses the category collector is a nice simplification and could be a follow-up. Thanks for the thorough implementation and tests, @Junass1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tools Tool registry, model_tools, toolsets P2 Medium — degraded but workaround exists platform/discord Discord bot adapter tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants