UNPKG

@valtown/codemirror-codeium

Version:

codemirror integration for codeium

500 lines 20.8 kB
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; import { Completion, EditorOptions, ExperimentKey, Metadata } from "../codeium_common_pb/codeium_common_pb"; /** * @generated from enum exa.language_server_pb.CodeiumState */ export declare enum CodeiumState { /** * @generated from enum value: CODEIUM_STATE_UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * @generated from enum value: CODEIUM_STATE_INACTIVE = 1; */ INACTIVE = 1, /** * @generated from enum value: CODEIUM_STATE_PROCESSING = 2; */ PROCESSING = 2, /** * @generated from enum value: CODEIUM_STATE_SUCCESS = 3; */ SUCCESS = 3, /** * @generated from enum value: CODEIUM_STATE_WARNING = 4; */ WARNING = 4, /** * @generated from enum value: CODEIUM_STATE_ERROR = 5; */ ERROR = 5 } /** * @generated from enum exa.language_server_pb.LineType */ export declare enum LineType { /** * @generated from enum value: LINE_TYPE_UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * @generated from enum value: LINE_TYPE_SINGLE = 1; */ SINGLE = 1, /** * @generated from enum value: LINE_TYPE_MULTI = 2; */ MULTI = 2 } /** * @generated from enum exa.language_server_pb.CompletionPartType */ export declare enum CompletionPartType { /** * @generated from enum value: COMPLETION_PART_TYPE_UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * Single-line completion parts that appear within an existing line of text. * * @generated from enum value: COMPLETION_PART_TYPE_INLINE = 1; */ INLINE = 1, /** * Possibly multi-line completion parts that appear below an existing line of text. * * @generated from enum value: COMPLETION_PART_TYPE_BLOCK = 2; */ BLOCK = 2, /** * Like COMPLETION_PART_TYPE_INLINE, but overwrites the existing text. * * @generated from enum value: COMPLETION_PART_TYPE_INLINE_MASK = 3; */ INLINE_MASK = 3 } /** * @generated from message exa.language_server_pb.MultilineConfig */ export declare class MultilineConfig extends Message<MultilineConfig> { /** * Multiline model threshold. 0-1, higher = more single line, lower = more multiline, * 0.0 = only_multiline, default is 0.5 * * @generated from field: float threshold = 1; */ threshold: number; constructor(data?: PartialMessage<MultilineConfig>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.MultilineConfig"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MultilineConfig; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MultilineConfig; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MultilineConfig; static equals(a: MultilineConfig | PlainMessage<MultilineConfig> | undefined, b: MultilineConfig | PlainMessage<MultilineConfig> | undefined): boolean; } /** * Next ID: 9, Previous field: disable_cache. * * @generated from message exa.language_server_pb.GetCompletionsRequest */ export declare class GetCompletionsRequest extends Message<GetCompletionsRequest> { /** * @generated from field: exa.codeium_common_pb.Metadata metadata = 1; */ metadata?: Metadata; /** * @generated from field: exa.language_server_pb.Document document = 2; */ document?: Document; /** * @generated from field: exa.codeium_common_pb.EditorOptions editor_options = 3; */ editorOptions?: EditorOptions; /** * @generated from field: repeated exa.language_server_pb.Document other_documents = 5; */ otherDocuments: Document[]; /** * @generated from field: exa.language_server_pb.ExperimentConfig experiment_config = 7; */ experimentConfig?: ExperimentConfig; /** * @generated from field: string model_name = 10; */ modelName: string; /** * @generated from field: exa.language_server_pb.MultilineConfig multiline_config = 13; */ multilineConfig?: MultilineConfig; constructor(data?: PartialMessage<GetCompletionsRequest>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.GetCompletionsRequest"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetCompletionsRequest; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetCompletionsRequest; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetCompletionsRequest; static equals(a: GetCompletionsRequest | PlainMessage<GetCompletionsRequest> | undefined, b: GetCompletionsRequest | PlainMessage<GetCompletionsRequest> | undefined): boolean; } /** * Next ID: 5, Previous field: latency_info. * * @generated from message exa.language_server_pb.GetCompletionsResponse */ export declare class GetCompletionsResponse extends Message<GetCompletionsResponse> { /** * @generated from field: exa.language_server_pb.State state = 1; */ state?: State; /** * @generated from field: repeated exa.language_server_pb.CompletionItem completion_items = 2; */ completionItems: CompletionItem[]; constructor(data?: PartialMessage<GetCompletionsResponse>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.GetCompletionsResponse"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetCompletionsResponse; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetCompletionsResponse; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetCompletionsResponse; static equals(a: GetCompletionsResponse | PlainMessage<GetCompletionsResponse> | undefined, b: GetCompletionsResponse | PlainMessage<GetCompletionsResponse> | undefined): boolean; } /** * Next ID: 3, Previous field: completion_id. * * @generated from message exa.language_server_pb.AcceptCompletionRequest */ export declare class AcceptCompletionRequest extends Message<AcceptCompletionRequest> { /** * @generated from field: exa.codeium_common_pb.Metadata metadata = 1; */ metadata?: Metadata; /** * @generated from field: string completion_id = 2; */ completionId: string; constructor(data?: PartialMessage<AcceptCompletionRequest>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.AcceptCompletionRequest"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AcceptCompletionRequest; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AcceptCompletionRequest; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AcceptCompletionRequest; static equals(a: AcceptCompletionRequest | PlainMessage<AcceptCompletionRequest> | undefined, b: AcceptCompletionRequest | PlainMessage<AcceptCompletionRequest> | undefined): boolean; } /** * Next ID: 1, Previous field: N/A. * * @generated from message exa.language_server_pb.AcceptCompletionResponse */ export declare class AcceptCompletionResponse extends Message<AcceptCompletionResponse> { constructor(data?: PartialMessage<AcceptCompletionResponse>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.AcceptCompletionResponse"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AcceptCompletionResponse; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AcceptCompletionResponse; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AcceptCompletionResponse; static equals(a: AcceptCompletionResponse | PlainMessage<AcceptCompletionResponse> | undefined, b: AcceptCompletionResponse | PlainMessage<AcceptCompletionResponse> | undefined): boolean; } /** * Next ID: 1, Previous field: N/A. * * @generated from message exa.language_server_pb.GetAuthTokenRequest */ export declare class GetAuthTokenRequest extends Message<GetAuthTokenRequest> { constructor(data?: PartialMessage<GetAuthTokenRequest>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.GetAuthTokenRequest"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetAuthTokenRequest; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetAuthTokenRequest; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetAuthTokenRequest; static equals(a: GetAuthTokenRequest | PlainMessage<GetAuthTokenRequest> | undefined, b: GetAuthTokenRequest | PlainMessage<GetAuthTokenRequest> | undefined): boolean; } /** * Next ID: 3, Previous field: uuid. * * @generated from message exa.language_server_pb.GetAuthTokenResponse */ export declare class GetAuthTokenResponse extends Message<GetAuthTokenResponse> { /** * @generated from field: string auth_token = 1; */ authToken: string; /** * @generated from field: string uuid = 2; */ uuid: string; constructor(data?: PartialMessage<GetAuthTokenResponse>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.GetAuthTokenResponse"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetAuthTokenResponse; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetAuthTokenResponse; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetAuthTokenResponse; static equals(a: GetAuthTokenResponse | PlainMessage<GetAuthTokenResponse> | undefined, b: GetAuthTokenResponse | PlainMessage<GetAuthTokenResponse> | undefined): boolean; } /** * @generated from message exa.language_server_pb.DocumentPosition */ export declare class DocumentPosition extends Message<DocumentPosition> { /** * 0-indexed. Measured in UTF-8 bytes. * * @generated from field: uint64 row = 1; */ row: bigint; /** * 0-indexed. Measured in UTF-8 bytes. * * @generated from field: uint64 col = 2; */ col: bigint; constructor(data?: PartialMessage<DocumentPosition>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.DocumentPosition"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DocumentPosition; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DocumentPosition; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DocumentPosition; static equals(a: DocumentPosition | PlainMessage<DocumentPosition> | undefined, b: DocumentPosition | PlainMessage<DocumentPosition> | undefined): boolean; } /** * Next ID: 9, Previous field: cursor_position. * * @generated from message exa.language_server_pb.Document */ export declare class Document extends Message<Document> { /** * @generated from field: string absolute_path = 1; */ absolutePath: string; /** * Path relative to the root of the workspace. * * @generated from field: string relative_path = 2; */ relativePath: string; /** * @generated from field: string text = 3; */ text: string; /** * Language ID provided by the editor. * * @generated from field: string editor_language = 4; */ editorLanguage: string; /** * Language enum standardized across editors. * * @generated from field: exa.codeium_common_pb.Language language = 5; */ language: any; /** * Measured in number of UTF-8 bytes. * * @generated from field: uint64 cursor_offset = 6; */ cursorOffset: bigint; /** * May be present instead of cursor_offset. * * @generated from field: exa.language_server_pb.DocumentPosition cursor_position = 8; */ cursorPosition?: DocumentPosition; /** * \n or \r\n, if known. * * @generated from field: string line_ending = 7; */ lineEnding: string; constructor(data?: PartialMessage<Document>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.Document"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Document; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Document; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Document; static equals(a: Document | PlainMessage<Document> | undefined, b: Document | PlainMessage<Document> | undefined): boolean; } /** * @generated from message exa.language_server_pb.ExperimentConfig */ export declare class ExperimentConfig extends Message<ExperimentConfig> { /** * @generated from field: repeated exa.codeium_common_pb.ExperimentKey force_enable_experiments = 1; */ forceEnableExperiments: ExperimentKey[]; constructor(data?: PartialMessage<ExperimentConfig>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.ExperimentConfig"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ExperimentConfig; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ExperimentConfig; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ExperimentConfig; static equals(a: ExperimentConfig | PlainMessage<ExperimentConfig> | undefined, b: ExperimentConfig | PlainMessage<ExperimentConfig> | undefined): boolean; } /** * Next ID: 3, Previous field: message. * * @generated from message exa.language_server_pb.State */ export declare class State extends Message<State> { /** * @generated from field: exa.language_server_pb.CodeiumState state = 1; */ state: CodeiumState; /** * @generated from field: string message = 2; */ message: string; constructor(data?: PartialMessage<State>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.State"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): State; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): State; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): State; static equals(a: State | PlainMessage<State> | undefined, b: State | PlainMessage<State> | undefined): boolean; } /** * Next ID: 5, Previous field: end_position. * * @generated from message exa.language_server_pb.Range */ export declare class Range extends Message<Range> { /** * @generated from field: uint64 start_offset = 1; */ startOffset: bigint; /** * @generated from field: uint64 end_offset = 2; */ endOffset: bigint; /** * @generated from field: exa.language_server_pb.DocumentPosition start_position = 3; */ startPosition?: DocumentPosition; /** * @generated from field: exa.language_server_pb.DocumentPosition end_position = 4; */ endPosition?: DocumentPosition; constructor(data?: PartialMessage<Range>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.Range"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Range; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Range; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Range; static equals(a: Range | PlainMessage<Range> | undefined, b: Range | PlainMessage<Range> | undefined): boolean; } /** * @generated from message exa.language_server_pb.Suffix */ export declare class Suffix extends Message<Suffix> { /** * Text to insert after the cursor when accepting the completion. * * @generated from field: string text = 1; */ text: string; /** * Cursor position delta (as signed offset) from the end of the inserted * completion (including the suffix). * * @generated from field: int64 delta_cursor_offset = 2; */ deltaCursorOffset: bigint; constructor(data?: PartialMessage<Suffix>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.Suffix"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Suffix; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Suffix; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Suffix; static equals(a: Suffix | PlainMessage<Suffix> | undefined, b: Suffix | PlainMessage<Suffix> | undefined): boolean; } /** * Represents a contiguous part of the completion text that is not * already in the document. * Next ID: 4, Previous field: prefix. * * @generated from message exa.language_server_pb.CompletionPart */ export declare class CompletionPart extends Message<CompletionPart> { /** * @generated from field: string text = 1; */ text: string; /** * Offset in the original document where the part starts. For block * parts, this is always the end of the line before the block. * * @generated from field: uint64 offset = 2; */ offset: bigint; /** * @generated from field: exa.language_server_pb.CompletionPartType type = 3; */ type: CompletionPartType; /** * The section of the original line that came before this part. Only valid for * COMPLETION_PART_TYPE_INLINE. * * @generated from field: string prefix = 4; */ prefix: string; /** * In the case of COMPLETION_PART_TYPE_BLOCK, represents the line it is below. * * @generated from field: uint64 line = 5; */ line: bigint; constructor(data?: PartialMessage<CompletionPart>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.CompletionPart"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CompletionPart; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CompletionPart; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CompletionPart; static equals(a: CompletionPart | PlainMessage<CompletionPart> | undefined, b: CompletionPart | PlainMessage<CompletionPart> | undefined): boolean; } /** * Next ID: 9, Previous field: completion_parts. * * @generated from message exa.language_server_pb.CompletionItem */ export declare class CompletionItem extends Message<CompletionItem> { /** * @generated from field: exa.codeium_common_pb.Completion completion = 1; */ completion?: Completion; /** * @generated from field: exa.language_server_pb.Suffix suffix = 5; */ suffix?: Suffix; /** * @generated from field: exa.language_server_pb.Range range = 2; */ range?: Range; /** * @generated from field: exa.codeium_common_pb.CompletionSource source = 3; */ source: any; /** * @generated from field: repeated exa.language_server_pb.CompletionPart completion_parts = 8; */ completionParts: CompletionPart[]; constructor(data?: PartialMessage<CompletionItem>); static readonly runtime: typeof proto3; static readonly typeName = "exa.language_server_pb.CompletionItem"; static readonly fields: FieldList; static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CompletionItem; static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CompletionItem; static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CompletionItem; static equals(a: CompletionItem | PlainMessage<CompletionItem> | undefined, b: CompletionItem | PlainMessage<CompletionItem> | undefined): boolean; } //# sourceMappingURL=language_server_pb.d.ts.map