Skip to content

fix: preserve search shorthand with aliases#137

Merged
RyanLee-Dev merged 1 commit into
MiniMax-AI:mainfrom
NianJiuZst:codex/fix-search-shorthand
May 12, 2026
Merged

fix: preserve search shorthand with aliases#137
RyanLee-Dev merged 1 commit into
MiniMax-AI:mainfrom
NianJiuZst:codex/fix-search-shorthand

Conversation

@NianJiuZst
Copy link
Copy Markdown
Contributor

Summary

Fixes #136.

This restores the documented resource-level search shorthand:

mmx search "MiniMax AI latest news"

when a command group contains multiple child names that are aliases for the same command implementation.

Root Cause

The registry only auto-forwarded a resource group when it had exactly one child command. Adding search web as an alias for search query made the search group have two children, so mmx search <query> started resolving as an unknown command even though both children point to the same command.

Changes

  • Keep the existing single-child auto-forward behavior.
  • Add alias-only group forwarding when every child command points to the same command object.
  • Add a regression test for mmx search "MiniMax AI latest news" style resolution.

Validation

  • bun test test/commands/aliases.test.ts
  • bun test
  • bun run typecheck
  • bun run dev search "MiniMax AI latest news" --dry-run --output json

@NianJiuZst NianJiuZst marked this pull request as ready for review May 12, 2026 09:23
@RyanLee-Dev
Copy link
Copy Markdown
Collaborator

Thanks for commit

@RyanLee-Dev RyanLee-Dev merged commit 9b523aa into MiniMax-AI:main May 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resource-level search shorthand fails after adding search web alias

2 participants