@jpoly1219/context-extractor 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/app.js +4 -3
- package/dist/core.d.ts +1 -1
- package/dist/main.js +4 -3
- package/dist/ocaml-driver.d.ts +1 -1
- package/dist/types.d.ts +1 -2
- package/dist/typescript-driver.d.ts +1 -1
- package/package.json +1 -1
package/dist/app.js
CHANGED
@@ -32,7 +32,8 @@ const fs = __importStar(require("fs"));
|
|
32
32
|
const child_process_1 = require("child_process");
|
33
33
|
const child_process_2 = require("child_process");
|
34
34
|
const openai_1 = __importDefault(require("openai"));
|
35
|
-
|
35
|
+
// import { LspClient, JSONRPCEndpoint } from "../ts-lsp-client-dist/src/main";
|
36
|
+
const ts_lsp_client_1 = require("ts-lsp-client");
|
36
37
|
const types_1 = require("./types");
|
37
38
|
// TODO: Bundle the drivers as barrel exports.
|
38
39
|
const typescript_driver_1 = require("./typescript-driver");
|
@@ -88,8 +89,8 @@ class App {
|
|
88
89
|
}
|
89
90
|
}
|
90
91
|
})();
|
91
|
-
const e = new
|
92
|
-
const c = new
|
92
|
+
const e = new ts_lsp_client_1.JSONRPCEndpoint(r.stdin, r.stdout);
|
93
|
+
const c = new ts_lsp_client_1.LspClient(e);
|
93
94
|
this.languageServer = r;
|
94
95
|
this.lspClient = c;
|
95
96
|
this.languageServer.on('close', (code) => {
|
package/dist/core.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="node" />
|
2
|
-
import { LspClient } from "
|
2
|
+
import { LspClient } from "ts-lsp-client";
|
3
3
|
import * as fs from "fs";
|
4
4
|
declare const getAnnotatedFunctionHoleContext: (sketchFileContent: string) => {
|
5
5
|
functionName: string;
|
package/dist/main.js
CHANGED
@@ -24,7 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.completeWithLLM = exports.extractContext = exports.extractWithCodeQL = exports.extract = void 0;
|
27
|
-
|
27
|
+
// import { JSONRPCEndpoint, LspClient, ClientCapabilities } from "../ts-lsp-client-dist/src/main.js"
|
28
|
+
const ts_lsp_client_1 = require("ts-lsp-client");
|
28
29
|
const child_process_1 = require("child_process");
|
29
30
|
const fs = __importStar(require("fs"));
|
30
31
|
const path = __importStar(require("path"));
|
@@ -41,8 +42,8 @@ const extract = async (sketchPath) => {
|
|
41
42
|
const workspaceFolders = [{ 'name': 'context-extractor', 'uri': rootUri }];
|
42
43
|
// initialize LS client and server
|
43
44
|
const r = (0, child_process_1.spawn)('typescript-language-server', ['--stdio']);
|
44
|
-
const e = new
|
45
|
-
const c = new
|
45
|
+
const e = new ts_lsp_client_1.JSONRPCEndpoint(r.stdin, r.stdout);
|
46
|
+
const c = new ts_lsp_client_1.LspClient(e);
|
46
47
|
console.log(JSON.stringify(c));
|
47
48
|
const capabilities = {
|
48
49
|
'textDocument': {
|
package/dist/ocaml-driver.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { LspClient, Range } from "
|
1
|
+
import { LspClient, Range } from "ts-lsp-client";
|
2
2
|
import { LanguageDriver, TypeSpanAndSourceFile } from "./types";
|
3
3
|
import { OcamlTypeChecker } from "./ocaml-type-checker";
|
4
4
|
export declare class OcamlDriver implements LanguageDriver {
|
package/dist/types.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { LspClient, Range } from "
|
1
|
+
import { LspClient, Range } from "ts-lsp-client";
|
2
2
|
import { LanguageDriver, TypeSpanAndSourceFile } from "./types";
|
3
3
|
import { TypeScriptTypeChecker } from "./typescript-type-checker";
|
4
4
|
export declare class TypeScriptDriver implements LanguageDriver {
|