MCPcopy Index your code
hub / github.com/dbcli/mycli / suggest_based_on_last_token

Function suggest_based_on_last_token

mycli/packages/completion_engine.py:822–834  ·  view source on GitHub ↗
(
    token: str | Token | None,
    text_before_cursor: str,
    word_before_cursor: str | None,
    full_text: str,
    identifier: Identifier,
)

Source from the content-addressed store, hash-verified

820
821
822def suggest_based_on_last_token(
823 token: str | Token | None,
824 text_before_cursor: str,
825 word_before_cursor: str | None,
826 full_text: str,
827 identifier: Identifier,
828) -> list[dict[str, Any]]:
829 ctx = _build_suggest_context(token, text_before_cursor, word_before_cursor, full_text, identifier)
830 for rule in SUGGEST_BASED_ON_LAST_TOKEN_RULES:
831 if rule.predicate(ctx):
832 return rule.emit(ctx)
833
834 return _keyword_suggestions()
835
836
837def identifies(

Calls 2

_build_suggest_contextFunction · 0.85
_keyword_suggestionsFunction · 0.85