fix(cli): prevent immediate submit when selecting /skill completions (#1830)#1838
Draft
bloodycoder wants to merge 1 commit intoMoonshotAI:mainfrom
Draft
Conversation
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.
Summary
Fixes #1830 by preventing immediate submission when a
/skill:*slash completion is selected before user adds task text.Root cause
Slash completion submission behavior was not driven by command semantics. Selecting certain slash completions could trigger submit immediately in paths where the completion accept flow is coupled with submit handling.
What changed
completion_submit = "auto_submit" | "insert_only"skill:*commands asinsert_only.auto_submitto preserve existing behavior.Files touched
src/kimi_cli/utils/slashcmd.pysrc/kimi_cli/soul/kimisoul.pysrc/kimi_cli/ui/shell/prompt.pytests/ui_and_conv/test_slash_completer.pytests/core/test_kimisoul_slash_commands.pytests/e2e/test_slash_completion_enter_tmux.pyExpected behavior after fix
/skill:*completion with Enter/Tab: insert only, no immediate submit.Test plan
Added/updated tests to cover:
Current status
Draft PR due to local environment mismatch:
.python-versionis 3.14)uv,tmuxI will update this PR with full passing logs after rerunning on a matching environment.