MCPcopy
hub / github.com/GitbookIO/gitbook / autocomplete

Method autocomplete

packages/expr/src/runtime.ts:212–220  ·  view source on GitHub ↗

* Provides autocomplete suggestions for the given expression at the provided cursor offset.

(
        expr: string,
        cursorOffset: number,
        context: SymbolsTable
    )

Source from the content-addressed store, hash-verified

210 * Provides autocomplete suggestions for the given expression at the provided cursor offset.
211 */
212 public autocomplete(
213 expr: string,
214 cursorOffset: number,
215 context: SymbolsTable
216 ): ExpressionAutocompleteResults {
217 const suggestions = this.#autocompleter.getSuggestions(expr, cursorOffset, context);
218
219 return { suggestions };
220 }
221
222 public generate(_node: Expression): string {
223 throw new Error('Not yet implemented');

Callers 1

Calls 1

getSuggestionsMethod · 0.80

Tested by

no test coverage detected