UNPKG

@valtown/codemirror-codeium

Version:

codemirror integration for codeium

18 lines 891 B
import type { Document, GetCompletionsResponse } from "./api/proto/exa/language_server_pb/language_server_pb.js"; import type { CodeiumConfig } from "./config.js"; import type { PartialMessage } from "@bufbuild/protobuf"; import type { SimpleChangeSpec } from "./types.js"; export declare function getCodeiumCompletions({ text, cursorOffset, config, otherDocuments, }: { text: string; cursorOffset: number; config: CodeiumConfig; otherDocuments: PartialMessage<Document>[]; }): Promise<GetCompletionsResponse>; /** * Make the body of the response a bit easier to work with: * turn a BigInt into an int in the response so that it can * be used with CodeMirror directly, and avoid using some * complex kinds of completions. */ export declare function completionsToChangeSpec(completions: GetCompletionsResponse): SimpleChangeSpec[][]; //# sourceMappingURL=codeium.d.ts.map