Skip to content
Draft
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions src/kimi_cli/ui/shell/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ def get_completions(
token = text[last_space + 1 :]

typed = token[1:]
if typed and typed in self._command_lookup:
return
mention_doc = Document(text=typed, cursor_position=len(typed))
candidates = list(self._fuzzy.get_completions(mention_doc, complete_event))

Expand Down
12 changes: 6 additions & 6 deletions tests/ui_and_conv/test_slash_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def _completions(completer: SlashCommandCompleter, text: str):
return list(completer.get_completions(document, event))


def test_exact_command_match_hides_completions():
"""Exact matches should not show completions."""
def test_exact_command_match_shows_completions():
"""Exact matches should still show slash menu candidates."""
completer = SlashCommandCompleter(
[
_make_command("mcp"),
Expand All @@ -59,11 +59,11 @@ def test_exact_command_match_hides_completions():

texts = _completion_texts(completer, "/mcp")

assert not texts
assert "/mcp" in texts


def test_exact_alias_match_hides_completions():
"""Exact alias matches should not show completions."""
def test_exact_alias_match_shows_completions():
"""Exact alias matches should still show canonical command candidates."""
completer = SlashCommandCompleter(
[
_make_command("help", aliases=["h"]),
Expand All @@ -73,7 +73,7 @@ def test_exact_alias_match_hides_completions():

texts = _completion_texts(completer, "/h")

assert not texts
assert "/help" in texts


def test_should_complete_only_for_root_slash_token():
Expand Down
Loading