fix: remove @staticmethod from _context_completions — crashes on @ mention

PR #9467 added a call to self._fuzzy_file_completions() inside
_context_completions(), but the method was still decorated with
@staticmethod and didn't receive self. Every @ mention in the input
triggers 'name self is not defined' from prompt_toolkit's async
completer, spamming the error on every keystroke.

Fix: remove @staticmethod, add self parameter. The method already uses
self._fuzzy_file_completions() and self._get_project_files() via that
call chain, so it was never meant to stay static after the fuzzy search
feature was added.
This commit is contained in:
kshitijk4poor 2026-04-14 19:23:44 +05:30 committed by Teknium
parent 4610551d74
commit 677f1227c3

View file

@ -844,8 +844,7 @@ class SlashCommandCompleter(Completer):
return None return None
return word return word
@staticmethod def _context_completions(self, word: str, limit: int = 30):
def _context_completions(word: str, limit: int = 30):
"""Yield Claude Code-style @ context completions. """Yield Claude Code-style @ context completions.
Bare ``@`` or ``@partial`` shows static references and matching Bare ``@`` or ``@partial`` shows static references and matching