Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Mar 25, 2024
1 parent 4e15665 commit b5e3315
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 155 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 3 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "@valtown/codemirror-ts",
"version": "2.1.0",
"description": "codemirror extensions for typescript",
"main": "./dist/commonjs/index.js",
"name": "@valtown/codemirror-codeium",
"version": "0.0.0",
"description": "codemirror integration for codeium",
"scripts": {
"dev": "vite",
"tsc": "tsc --noEmit",
Expand Down Expand Up @@ -33,30 +32,6 @@
"files": [
"dist"
],
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
},
"./worker": {
"import": {
"types": "./dist/esm/worker.d.ts",
"default": "./dist/esm/worker.js"
},
"require": {
"types": "./dist/commonjs/worker.d.ts",
"default": "./dist/commonjs/worker.js"
}
}
},
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"engines": {
"node": "*"
Expand Down
12 changes: 9 additions & 3 deletions src/api/proto/exa/language_server_pb/language_server_connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
/* eslint-disable */
// @ts-nocheck

import { AcceptCompletionRequest, AcceptCompletionResponse, GetAuthTokenRequest, GetAuthTokenResponse, GetCompletionsRequest, GetCompletionsResponse } from "./language_server_pb";
import {
AcceptCompletionRequest,
AcceptCompletionResponse,
GetAuthTokenRequest,
GetAuthTokenResponse,
GetCompletionsRequest,
GetCompletionsResponse,
} from "./language_server_pb";
import { MethodKind } from "@bufbuild/protobuf";

/**
Expand Down Expand Up @@ -41,6 +48,5 @@ export const LanguageServerService = {
O: GetAuthTokenResponse,
kind: MethodKind.Unary,
},
}
},
} as const;

6 changes: 3 additions & 3 deletions src/codeium.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createPromiseClient } from "@connectrpc/connect";
import { LanguageServerService } from "./api/proto/exa/language_server_pb/language_server_connect";
import { LanguageServerService } from "./api/proto/exa/language_server_pb/language_server_connect.js";
import { createConnectTransport } from "@connectrpc/connect-web";
import { Language } from "./api/proto/exa/codeium_common_pb/codeium_common_pb";
import { Language } from "./api/proto/exa/codeium_common_pb/codeium_common_pb.js";

// This is the same as the monaco editor example
const EDITOR_API_KEY = "d49954eb-cfba-4992-980f-d8fb37f0e942";
Expand Down Expand Up @@ -52,7 +52,7 @@ export async function getCodeiumCompletions({
headers: {
Authorization: `Basic ${EDITOR_API_KEY}-${sessionId}`,
},
}
},
);

const parts = completions.completionItems[0].completionParts

Check failure on line 58 in src/codeium.ts

View workflow job for this annotation

GitHub Actions / Test

Property 'completionItems' does not exist on type 'Message<unknown>'.
Expand Down
Loading

0 comments on commit b5e3315

Please sign in to comment.