fix(shell): register /btw slash command#2205
Merged
7Sageer merged 4 commits intoMoonshotAI:mainfrom May 9, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Registers /btw in the shell slash-command registry so it shows up in agent-mode slash completion, and adds a regression test to ensure it remains discoverable via the completer.
Changes:
- Added a
/btwshell-level slash command registration (and handler) inui/shell/slash.py. - Added a test asserting
/btwappears in agent-mode slash completion suggestions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/kimi_cli/ui/shell/slash.py | Registers /btw on the shell slash registry so it is discoverable via agent-mode completion. |
| tests/ui_and_conv/test_slash_completer.py | Adds coverage ensuring /btw is suggested by the slash completer. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Make the /btw handler registered in shell_slash_registry actually reachable. Idle input now goes through the standard slash dispatcher instead of being short-circuited by classify_input. Streaming keeps in-view recognition (no dispatcher exists in that context), but uses parse_slash_command_call directly; the InputAction / classify_input abstraction is removed. - Rename Shell._run_btw_modal -> run_btw_modal (public) - Drop idle interception block in Shell.run() - Extract _handle_btw_command / _block_shell_only_command helpers shared by handle_local_input and handle_immediate_steer - Delete src/kimi_cli/ui/shell/visualize/_input_router.py - Update tests accordingly
Collaborator
Author
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…t_router" This reverts commit 76238ce.
This was referenced May 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
N/A — bug fix for
/btwslash completion.Description
/btwwas documented and worked, but didn't appear in agent-mode slash completion or/helpbecause it was never registered withshell_slash_registry.This PR fixes the registration:
Commit 1 —
fix(shell): register /btw slash command/btw <question>toshell_slash_registryso it appears in agent-mode completion and/help.Before:
After:
Tests
uv run python -m pytest tests/ui_and_conv -q— 718 passedmake format-kimi-climake check-kimi-cliChecklist
make gen-changelogto update the changelog. (N/A:/btwis already documented in the release notes; this PR doesn't change user-facing behavior.)make gen-docsto update the user documentation. (N/A: existing docs already describe/btw; this PR keeps the implementation behavior identical.)