Skip to content

Conversation

@Grin1024
Copy link

@Grin1024 Grin1024 commented Jan 29, 2026

Description:

This PR improves the interactive shell experience ( src/kimi_cli/ui/shell/prompt.py ) by refining how completions are navigated and accepted.

Changes:

  1. Tab Key Behavior :

    • Added a specific listener for the Tab key when completions are active.
    • Effect : Pressing Tab now accepts the selected completion (or the first one if none is selected) and immediately appends a space . This removes the friction of manually typing a space after autocompleting commands like /review or /help .
  2. Menu Navigation (Up/Down) :

    • Overrode the default Up and Down key bindings when the completion menu is visible.
    • Effect : These keys now only change the selection index in the dropdown menu without updating the text in the input buffer. This allows users to browse through fuzzy-matched options without losing their partially typed keyword/filter.
      Impact:
  • Better UX : Users can type /rev -> Tab -> arguments seamlessly.
  • Non-destructive Navigation : Browsing the list no longer destroys the user's typed context.

Related Issue

Resolve #751

Description

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Open with Devin

Copy link

@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 3 additional flags.

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 commands execute immediately upon selection.

1 participant