fix(discord): expose /reasoning reset|show|hide as slash choices - #55803
fix(discord): expose /reasoning reset|show|hide as slash choices#55803sam7894604 wants to merge 1 commit into
Conversation
The Discord /reasoning command declared a single free-text `effort` parameter, so the native UI funneled every invocation into that one box and never surfaced the reset / show / hide subcommands the gateway handler already supports. Replace the free-text param with an explicit choices dropdown covering the effort levels plus reset/show/hide, mirroring the existing /tokens and /voice commands. --global persistence stays reachable by typing the command as plain text. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
teknium1
left a comment
There was a problem hiding this comment.
Thanks for identifying the native Discord command UX gap. The direction is correct: current main still registers /reasoning as a free-text parameter at plugins/platforms/discord/adapter.py:4087-4090, while the gateway already handles reset, show, and hide at gateway/slash_commands.py:2715-2737.
Problems
- The proposed dropdown stops at
xhigh, but current main supportsmaxandultra(gateway/slash_commands.py:2736) and already advertises them in the Discord parameter description (plugins/platforms/discord/adapter.py:4088). Please include both so the native UI covers the current canonical effort levels. - There is no regression coverage for the Discord registration. Searches for
slash_reasoning, the/reasoningcommand decorator, andapp_commands.choicesfound no matching test undertests/.
Suggested changes
- Reapply the decorator block against current
plugins/platforms/discord/adapter.py:4087and addmax/ultrachoices. - Add a focused test asserting the registered
/reasoningchoices include the canonical effort levels plusreset,show, andhide.
Automated hermes-sweeper review.
| # explicit choice. --global persistence stays reachable by typing the | ||
| # command as plain text. | ||
| discord.app_commands.Choice(name="none — disable reasoning", value="none"), | ||
| discord.app_commands.Choice(name="minimal", value="minimal"), |
There was a problem hiding this comment.
Current main also accepts max and ultra (gateway/slash_commands.py:2736) and its Discord description advertises both. Please add them here so the dropdown covers all current canonical effort levels.
|
Merged via PR #65732 — your commit was cherry-picked onto current main with your authorship preserved in git history. Good catch on Discord's native UI having no subcommand affordance for free-text params — the reset/show/hide subcommands were effectively invisible. During salvage we also widened your choices list with the |
What does this PR do?
The Discord
/reasoningcommand declared a single free-texteffortparameter, so the native UI funneled every invocation into that one box and
never surfaced the
reset/show/hidesubcommands the gateway handleralready supports. Replace the free-text param with an explicit
choicesdropdown covering the effort levels plus
reset/show/hide, mirroringthe existing
/tokensand/voicecommands.--globalpersistence staysreachable by typing the command as plain text.
Related Issue
Fixes #
Type of Change
Changes Made
plugins/platforms/discord/adapter.py— replace the/reasoningfree-texteffortparameter with a@discord.app_commands.choicesdropdown coveringnone/minimal/low/medium/high/xhighplusreset/show/hide.How to Test
/reasoning— theeffortparameter now shows a dropdown.reset/show/hidefrom the dropdown and confirm each reachesthe gateway handler (previously unreachable from the slash UI).
high,xhigh, …) still work.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass (focused suite: discord slash registration + reasoning/tokens/usage — 66+ passing; full-suite collection has 2 pre-existing Windows-only environment gaps unrelated to this change: ACP tests needing optional deps, and a /tmp path test)Documentation & 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/AScreenshots / Logs
/reasoningnow offersreset/show/hide(plus the effort levels) asselectable choices in Discord's native slash UI instead of a single free-text
box.
🤖 Generated with Claude Code