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

Function _build_suggest_context

mycli/packages/completion_engine.py:107–123  ·  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

105
106
107def _build_suggest_context(
108 token: str | Token | None,
109 text_before_cursor: str,
110 word_before_cursor: str | None,
111 full_text: str,
112 identifier: Identifier,
113) -> SuggestContext:
114 return SuggestContext(
115 token=token,
116 token_value=_normalize_token_value(token),
117 text_before_cursor=text_before_cursor,
118 word_before_cursor=word_before_cursor,
119 full_text=full_text,
120 identifier=identifier,
121 parsed_cb=functools.partial(_parse_suggestion_statement, text_before_cursor),
122 tokens_wo_space_cb=functools.partial(_tokens_wo_space, text_before_cursor),
123 )
124
125
126def _is_single_or_double_quoted(ctx: SuggestContext) -> bool:

Calls 2

SuggestContextClass · 0.85
_normalize_token_valueFunction · 0.85