Skip to content

fix(shell): make slash command aliases work in shell UI#1029

Open
azidancorp wants to merge 2 commits intoMoonshotAI:mainfrom
azidancorp:fix/slash-command-aliases
Open

fix(shell): make slash command aliases work in shell UI#1029
azidancorp wants to merge 2 commits intoMoonshotAI:mainfrom
azidancorp:fix/slash-command-aliases

Conversation

@azidancorp
Copy link

@azidancorp azidancorp commented Feb 7, 2026

Related Issue

Resolve #1028 )

Description

Slash command aliases (e.g., /reset) were registered but failed to execute when typed in full. Tab completion worked, but pressing Enter resulted in "Unknown slash command".

Changes

  1. Fix alias recognition (src/kimi_cli/ui/shell/__init__.py):

    • Changed initialization to iterate through all commands and register both primary names and aliases
  2. Fix duplicate entries in /help (src/kimi_cli/ui/shell/__init__.py, src/kimi_cli/ui/shell/slash.py):

    • Added get_unique_slash_commands() method to return deduplicated command list
    • Updated help display and prompt session to use unique commands

Checklist

  • [ x] I have read the CONTRIBUTING document.

  • [ x] I have linked the related issue, if any.

  • I have added tests that prove my fix is effective or that my feature works. (Tested manually)

  • [ x] I have run make gen-changelog to update the changelog.

  • [ x] I have run make gen-docs to update the user documentation.

    Related PR

    This fix is required for PR Feat/new alias for clear #1026 (adding /new alias) to work correctly. Recommend merging this first.


Open with Devin

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

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.

Slash command aliases don't work when typed in full

1 participant