Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/kimi_cli/ui/shell/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,10 @@ def _(event: KeyPressEvent) -> None:
if not completion:
completion = buff.complete_state.completions[0]
buff.apply_completion(completion)
# Auto-submit if the result is a bare slash command (no arguments)
text = buff.text.strip()
if text.startswith("/") and " " not in text:
buff.validate_and_handle()
Comment on lines +1023 to +1026
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Skip auto-submit for slash commands that take arguments

Calling validate_and_handle() immediately after apply_completion() means the user never gets a chance to type the space and arguments that the PR description relies on. In practice, choosing /plan from completion now executes the bare command right away, and src/kimi_cli/soul/slash.py:104-141 treats empty args as a state-changing toggle; similarly, /add-dir and /import (src/kimi_cli/soul/slash.py:145-155 and :247-255) are submitted before a path can be entered. That makes completion actively destructive or unusable for argument-taking slash commands.

Useful? React with 👍 / 👎.


@_kb.add("c-x", eager=True)
def _(event: KeyPressEvent) -> None:
Expand Down
Loading