var B = Object.defineProperty;
var a = (r, t) => B(r, "name", { value: t, configurable: !0 });
import { Metadata as L, EditorOptions as _, Language as P, ExperimentKey as O, CompletionSource as k, Completion as F } from "../codeium_common_pb/codeium_common_pb.js";
import { proto3 as e } from "../../../../../../../../../@bufbuild_protobuf@1.10.0/node_modules/@bufbuild/protobuf/dist/esm/proto3.js";
import { Message as s } from "../../../../../../../../../@bufbuild_protobuf@1.10.0/node_modules/@bufbuild/protobuf/dist/esm/message.js";
import { protoInt64 as o } from "../../../../../../../../../@bufbuild_protobuf@1.10.0/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js";
var S;
(function(r) {
  r[r.UNSPECIFIED = 0] = "UNSPECIFIED", r[r.INACTIVE = 1] = "INACTIVE", r[r.PROCESSING = 2] = "PROCESSING", r[r.SUCCESS = 3] = "SUCCESS", r[r.WARNING = 4] = "WARNING", r[r.ERROR = 5] = "ERROR";
})(S || (S = {}));
e.util.setEnumType(S, "exa.language_server_pb.CodeiumState", [
  { no: 0, name: "CODEIUM_STATE_UNSPECIFIED" },
  { no: 1, name: "CODEIUM_STATE_INACTIVE" },
  { no: 2, name: "CODEIUM_STATE_PROCESSING" },
  { no: 3, name: "CODEIUM_STATE_SUCCESS" },
  { no: 4, name: "CODEIUM_STATE_WARNING" },
  { no: 5, name: "CODEIUM_STATE_ERROR" }
]);
var x;
(function(r) {
  r[r.UNSPECIFIED = 0] = "UNSPECIFIED", r[r.SINGLE = 1] = "SINGLE", r[r.MULTI = 2] = "MULTI";
})(x || (x = {}));
e.util.setEnumType(x, "exa.language_server_pb.LineType", [
  { no: 0, name: "LINE_TYPE_UNSPECIFIED" },
  { no: 1, name: "LINE_TYPE_SINGLE" },
  { no: 2, name: "LINE_TYPE_MULTI" }
]);
var y;
(function(r) {
  r[r.UNSPECIFIED = 0] = "UNSPECIFIED", r[r.INLINE = 1] = "INLINE", r[r.BLOCK = 2] = "BLOCK", r[r.INLINE_MASK = 3] = "INLINE_MASK";
})(y || (y = {}));
e.util.setEnumType(y, "exa.language_server_pb.CompletionPartType", [
  { no: 0, name: "COMPLETION_PART_TYPE_UNSPECIFIED" },
  { no: 1, name: "COMPLETION_PART_TYPE_INLINE" },
  { no: 2, name: "COMPLETION_PART_TYPE_BLOCK" },
  { no: 3, name: "COMPLETION_PART_TYPE_INLINE_MASK" }
]);
class m extends s {
  static {
    a(this, "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 = 0;
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.MultilineConfig";
  static fields = e.util.newFieldList(() => [
    {
      no: 1,
      name: "threshold",
      kind: "scalar",
      T: 2
      /* ScalarType.FLOAT */
    }
  ]);
  static fromBinary(t, n) {
    return new m().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new m().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new m().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(m, t, n);
  }
}
class T extends s {
  static {
    a(this, "GetCompletionsRequest");
  }
  /**
   * @generated from field: exa.codeium_common_pb.Metadata metadata = 1;
   */
  metadata;
  /**
   * @generated from field: exa.language_server_pb.Document document = 2;
   */
  document;
  /**
   * @generated from field: exa.codeium_common_pb.EditorOptions editor_options = 3;
   */
  editorOptions;
  /**
   * @generated from field: repeated exa.language_server_pb.Document other_documents = 5;
   */
  otherDocuments = [];
  /**
   * @generated from field: exa.language_server_pb.ExperimentConfig experiment_config = 7;
   */
  experimentConfig;
  /**
   * @generated from field: string model_name = 10;
   */
  modelName = "";
  /**
   * @generated from field: exa.language_server_pb.MultilineConfig multiline_config = 13;
   */
  multilineConfig;
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.GetCompletionsRequest";
  static fields = e.util.newFieldList(() => [
    { no: 1, name: "metadata", kind: "message", T: L },
    { no: 2, name: "document", kind: "message", T: u },
    { no: 3, name: "editor_options", kind: "message", T: _ },
    { no: 5, name: "other_documents", kind: "message", T: u, repeated: !0 },
    { no: 7, name: "experiment_config", kind: "message", T: l },
    {
      no: 10,
      name: "model_name",
      kind: "scalar",
      T: 9
      /* ScalarType.STRING */
    },
    { no: 13, name: "multiline_config", kind: "message", T: m }
  ]);
  static fromBinary(t, n) {
    return new T().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new T().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new T().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(T, t, n);
  }
}
class I extends s {
  static {
    a(this, "GetCompletionsResponse");
  }
  /**
   * @generated from field: exa.language_server_pb.State state = 1;
   */
  state;
  /**
   * @generated from field: repeated exa.language_server_pb.CompletionItem completion_items = 2;
   */
  completionItems = [];
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.GetCompletionsResponse";
  static fields = e.util.newFieldList(() => [
    { no: 1, name: "state", kind: "message", T: c },
    { no: 2, name: "completion_items", kind: "message", T: E, repeated: !0 }
  ]);
  static fromBinary(t, n) {
    return new I().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new I().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new I().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(I, t, n);
  }
}
class N extends s {
  static {
    a(this, "AcceptCompletionRequest");
  }
  /**
   * @generated from field: exa.codeium_common_pb.Metadata metadata = 1;
   */
  metadata;
  /**
   * @generated from field: string completion_id = 2;
   */
  completionId = "";
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.AcceptCompletionRequest";
  static fields = e.util.newFieldList(() => [
    { no: 1, name: "metadata", kind: "message", T: L },
    {
      no: 2,
      name: "completion_id",
      kind: "scalar",
      T: 9
      /* ScalarType.STRING */
    }
  ]);
  static fromBinary(t, n) {
    return new N().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new N().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new N().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(N, t, n);
  }
}
class w extends s {
  static {
    a(this, "AcceptCompletionResponse");
  }
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.AcceptCompletionResponse";
  static fields = e.util.newFieldList(() => []);
  static fromBinary(t, n) {
    return new w().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new w().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new w().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(w, t, n);
  }
}
class J extends s {
  static {
    a(this, "GetAuthTokenRequest");
  }
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.GetAuthTokenRequest";
  static fields = e.util.newFieldList(() => []);
  static fromBinary(t, n) {
    return new J().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new J().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new J().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(J, t, n);
  }
}
class p extends s {
  static {
    a(this, "GetAuthTokenResponse");
  }
  /**
   * @generated from field: string auth_token = 1;
   */
  authToken = "";
  /**
   * @generated from field: string uuid = 2;
   */
  uuid = "";
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.GetAuthTokenResponse";
  static fields = e.util.newFieldList(() => [
    {
      no: 1,
      name: "auth_token",
      kind: "scalar",
      T: 9
      /* ScalarType.STRING */
    },
    {
      no: 2,
      name: "uuid",
      kind: "scalar",
      T: 9
      /* ScalarType.STRING */
    }
  ]);
  static fromBinary(t, n) {
    return new p().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new p().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new p().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(p, t, n);
  }
}
class i extends s {
  static {
    a(this, "DocumentPosition");
  }
  /**
   * 0-indexed. Measured in UTF-8 bytes.
   *
   * @generated from field: uint64 row = 1;
   */
  row = o.zero;
  /**
   * 0-indexed. Measured in UTF-8 bytes.
   *
   * @generated from field: uint64 col = 2;
   */
  col = o.zero;
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.DocumentPosition";
  static fields = e.util.newFieldList(() => [
    {
      no: 1,
      name: "row",
      kind: "scalar",
      T: 4
      /* ScalarType.UINT64 */
    },
    {
      no: 2,
      name: "col",
      kind: "scalar",
      T: 4
      /* ScalarType.UINT64 */
    }
  ]);
  static fromBinary(t, n) {
    return new i().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new i().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new i().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(i, t, n);
  }
}
class u extends s {
  static {
    a(this, "Document");
  }
  /**
   * @generated from field: string absolute_path = 1;
   */
  absolutePath = "";
  /**
   * Path relative to the root of the workspace.
   *
   * @generated from field: string relative_path = 2;
   */
  relativePath = "";
  /**
   * @generated from field: string text = 3;
   */
  text = "";
  /**
   * Language ID provided by the editor.
   *
   * @generated from field: string editor_language = 4;
   */
  editorLanguage = "";
  /**
   * Language enum standardized across editors.
   *
   * @generated from field: exa.codeium_common_pb.Language language = 5;
   */
  language = P.UNSPECIFIED;
  /**
   * Measured in number of UTF-8 bytes.
   *
   * @generated from field: uint64 cursor_offset = 6;
   */
  cursorOffset = o.zero;
  /**
   * May be present instead of cursor_offset.
   *
   * @generated from field: exa.language_server_pb.DocumentPosition cursor_position = 8;
   */
  cursorPosition;
  /**
   * \n or \r\n, if known.
   *
   * @generated from field: string line_ending = 7;
   */
  lineEnding = "";
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.Document";
  static fields = e.util.newFieldList(() => [
    {
      no: 1,
      name: "absolute_path",
      kind: "scalar",
      T: 9
      /* ScalarType.STRING */
    },
    {
      no: 2,
      name: "relative_path",
      kind: "scalar",
      T: 9
      /* ScalarType.STRING */
    },
    {
      no: 3,
      name: "text",
      kind: "scalar",
      T: 9
      /* ScalarType.STRING */
    },
    {
      no: 4,
      name: "editor_language",
      kind: "scalar",
      T: 9
      /* ScalarType.STRING */
    },
    { no: 5, name: "language", kind: "enum", T: e.getEnumType(P) },
    {
      no: 6,
      name: "cursor_offset",
      kind: "scalar",
      T: 4
      /* ScalarType.UINT64 */
    },
    { no: 8, name: "cursor_position", kind: "message", T: i },
    {
      no: 7,
      name: "line_ending",
      kind: "scalar",
      T: 9
      /* ScalarType.STRING */
    }
  ]);
  static fromBinary(t, n) {
    return new u().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new u().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new u().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(u, t, n);
  }
}
class l extends s {
  static {
    a(this, "ExperimentConfig");
  }
  /**
   * @generated from field: repeated exa.codeium_common_pb.ExperimentKey force_enable_experiments = 1;
   */
  forceEnableExperiments = [];
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.ExperimentConfig";
  static fields = e.util.newFieldList(() => [
    { no: 1, name: "force_enable_experiments", kind: "enum", T: e.getEnumType(O), repeated: !0 }
  ]);
  static fromBinary(t, n) {
    return new l().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new l().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new l().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(l, t, n);
  }
}
class c extends s {
  static {
    a(this, "State");
  }
  /**
   * @generated from field: exa.language_server_pb.CodeiumState state = 1;
   */
  state = S.UNSPECIFIED;
  /**
   * @generated from field: string message = 2;
   */
  message = "";
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.State";
  static fields = e.util.newFieldList(() => [
    { no: 1, name: "state", kind: "enum", T: e.getEnumType(S) },
    {
      no: 2,
      name: "message",
      kind: "scalar",
      T: 9
      /* ScalarType.STRING */
    }
  ]);
  static fromBinary(t, n) {
    return new c().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new c().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new c().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(c, t, n);
  }
}
class f extends s {
  static {
    a(this, "Range");
  }
  /**
   * @generated from field: uint64 start_offset = 1;
   */
  startOffset = o.zero;
  /**
   * @generated from field: uint64 end_offset = 2;
   */
  endOffset = o.zero;
  /**
   * @generated from field: exa.language_server_pb.DocumentPosition start_position = 3;
   */
  startPosition;
  /**
   * @generated from field: exa.language_server_pb.DocumentPosition end_position = 4;
   */
  endPosition;
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.Range";
  static fields = e.util.newFieldList(() => [
    {
      no: 1,
      name: "start_offset",
      kind: "scalar",
      T: 4
      /* ScalarType.UINT64 */
    },
    {
      no: 2,
      name: "end_offset",
      kind: "scalar",
      T: 4
      /* ScalarType.UINT64 */
    },
    { no: 3, name: "start_position", kind: "message", T: i },
    { no: 4, name: "end_position", kind: "message", T: i }
  ]);
  static fromBinary(t, n) {
    return new f().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new f().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new f().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(f, t, n);
  }
}
class d extends s {
  static {
    a(this, "Suffix");
  }
  /**
   * Text to insert after the cursor when accepting the completion.
   *
   * @generated from field: string text = 1;
   */
  text = "";
  /**
   * 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 = o.zero;
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.Suffix";
  static fields = e.util.newFieldList(() => [
    {
      no: 1,
      name: "text",
      kind: "scalar",
      T: 9
      /* ScalarType.STRING */
    },
    {
      no: 2,
      name: "delta_cursor_offset",
      kind: "scalar",
      T: 3
      /* ScalarType.INT64 */
    }
  ]);
  static fromBinary(t, n) {
    return new d().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new d().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new d().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(d, t, n);
  }
}
class g extends s {
  static {
    a(this, "CompletionPart");
  }
  /**
   * @generated from field: string text = 1;
   */
  text = "";
  /**
   * 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 = o.zero;
  /**
   * @generated from field: exa.language_server_pb.CompletionPartType type = 3;
   */
  type = y.UNSPECIFIED;
  /**
   * 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 = "";
  /**
   * In the case of COMPLETION_PART_TYPE_BLOCK, represents the line it is below.
   *
   * @generated from field: uint64 line = 5;
   */
  line = o.zero;
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.CompletionPart";
  static fields = e.util.newFieldList(() => [
    {
      no: 1,
      name: "text",
      kind: "scalar",
      T: 9
      /* ScalarType.STRING */
    },
    {
      no: 2,
      name: "offset",
      kind: "scalar",
      T: 4
      /* ScalarType.UINT64 */
    },
    { no: 3, name: "type", kind: "enum", T: e.getEnumType(y) },
    {
      no: 4,
      name: "prefix",
      kind: "scalar",
      T: 9
      /* ScalarType.STRING */
    },
    {
      no: 5,
      name: "line",
      kind: "scalar",
      T: 4
      /* ScalarType.UINT64 */
    }
  ]);
  static fromBinary(t, n) {
    return new g().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new g().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new g().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(g, t, n);
  }
}
class E extends s {
  static {
    a(this, "CompletionItem");
  }
  /**
   * @generated from field: exa.codeium_common_pb.Completion completion = 1;
   */
  completion;
  /**
   * @generated from field: exa.language_server_pb.Suffix suffix = 5;
   */
  suffix;
  /**
   * @generated from field: exa.language_server_pb.Range range = 2;
   */
  range;
  /**
   * @generated from field: exa.codeium_common_pb.CompletionSource source = 3;
   */
  source = k.UNSPECIFIED;
  /**
   * @generated from field: repeated exa.language_server_pb.CompletionPart completion_parts = 8;
   */
  completionParts = [];
  constructor(t) {
    super(), e.util.initPartial(t, this);
  }
  static runtime = e;
  static typeName = "exa.language_server_pb.CompletionItem";
  static fields = e.util.newFieldList(() => [
    { no: 1, name: "completion", kind: "message", T: F },
    { no: 5, name: "suffix", kind: "message", T: d },
    { no: 2, name: "range", kind: "message", T: f },
    { no: 3, name: "source", kind: "enum", T: e.getEnumType(k) },
    { no: 8, name: "completion_parts", kind: "message", T: g, repeated: !0 }
  ]);
  static fromBinary(t, n) {
    return new E().fromBinary(t, n);
  }
  static fromJson(t, n) {
    return new E().fromJson(t, n);
  }
  static fromJsonString(t, n) {
    return new E().fromJsonString(t, n);
  }
  static equals(t, n) {
    return e.util.equals(E, t, n);
  }
}
export {
  N as AcceptCompletionRequest,
  w as AcceptCompletionResponse,
  S as CodeiumState,
  E as CompletionItem,
  g as CompletionPart,
  y as CompletionPartType,
  u as Document,
  i as DocumentPosition,
  l as ExperimentConfig,
  J as GetAuthTokenRequest,
  p as GetAuthTokenResponse,
  T as GetCompletionsRequest,
  I as GetCompletionsResponse,
  x as LineType,
  m as MultilineConfig,
  f as Range,
  c as State,
  d as Suffix
};
