Skip to content

fix(discord): expose /reasoning reset|show|hide as slash choices - #55803

Closed
sam7894604 wants to merge 1 commit into
NousResearch:mainfrom
sam7894604:feat/discord-reasoning-choices
Closed

fix(discord): expose /reasoning reset|show|hide as slash choices#55803
sam7894604 wants to merge 1 commit into
NousResearch:mainfrom
sam7894604:feat/discord-reasoning-choices

Conversation

@sam7894604

@sam7894604 sam7894604 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

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.

Related Issue

Fixes #

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • plugins/platforms/discord/adapter.py — replace the /reasoning free-text
    effort parameter with a @discord.app_commands.choices dropdown covering
    none/minimal/low/medium/high/xhigh plus reset/show/hide.

How to Test

  1. In Discord, type /reasoning — the effort parameter now shows a dropdown.
  2. Pick reset / show / hide from the dropdown and confirm each reaches
    the gateway handler (previously unreachable from the slash UI).
  3. Effort levels (high, xhigh, …) still work.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and 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)
  • I've added tests for my changes
  • I've tested on my platform: Discord (live bot)

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) — or N/A (Discord adapter only)
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

/reasoning now offers reset / show / hide (plus the effort levels) as
selectable choices in Discord's native slash UI instead of a single free-text
box.


🤖 Generated with Claude Code

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>
@alt-glitch alt-glitch added type/bug Something isn't working comp/plugins Plugin system and bundled plugins platform/discord Discord bot adapter P3 Low — cosmetic, nice to have labels Jun 30, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 supports max and ultra (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 /reasoning command decorator, and app_commands.choices found no matching test under tests/.

Suggested changes

  • Reapply the decorator block against current plugins/platforms/discord/adapter.py:4087 and add max/ultra choices.
  • Add a focused test asserting the registered /reasoning choices include the canonical effort levels plus reset, show, and hide.

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"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 15, 2026
@teknium1

Copy link
Copy Markdown
Contributor

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 max and ultra effort levels that landed after your branch (#62650). Thanks!

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

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have platform/discord Discord bot adapter sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants