@jpoly1219/context-extractor 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/app.js +1 -2
- package/dist/core.d.ts +1 -1
- package/dist/core.js +2 -0
- package/dist/main.js +4 -4
- package/dist/ocaml-driver.d.ts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/typescript-driver.d.ts +1 -1
- package/package.json +2 -2
package/dist/app.js
CHANGED
@@ -32,9 +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
|
+
const main_1 = require("../ts-lsp-client-dist/src/main");
|
36
36
|
// import { LspClient, JSONRPCEndpoint } from "ts-lsp-client";
|
37
|
-
const main_1 = require("dist/ts-lsp-client-dist/src/main");
|
38
37
|
const types_1 = require("./types");
|
39
38
|
// TODO: Bundle the drivers as barrel exports.
|
40
39
|
const typescript_driver_1 = require("./typescript-driver");
|
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-dist/src/main.js";
|
3
3
|
import * as fs from "fs";
|
4
4
|
declare const getAnnotatedFunctionHoleContext: (sketchFileContent: string) => {
|
5
5
|
functionName: string;
|
package/dist/core.js
CHANGED
@@ -24,6 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.normalize = exports.extractRelevantHeaders = exports.extractRelevantTypes = exports.getHoleContext = exports.getAnnotatedFunctionHoleContext = void 0;
|
27
|
+
// import { LspClient, MarkupContent, Location, SymbolInformation, Range } from "ts-lsp-client"
|
28
|
+
// import { LspClient, MarkupContent, Location, SymbolInformation, Range } from "dist/ts-lsp-client-dist/src/main"
|
27
29
|
const utils_js_1 = require("./utils.js");
|
28
30
|
const fs = __importStar(require("fs"));
|
29
31
|
const child_process_1 = require("child_process");
|
package/dist/main.js
CHANGED
@@ -24,9 +24,9 @@ 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
|
+
const main_js_1 = require("../ts-lsp-client-dist/src/main.js");
|
28
28
|
// import { JSONRPCEndpoint, LspClient, ClientCapabilities } from "ts-lsp-client"
|
29
|
-
|
29
|
+
// import { JSONRPCEndpoint, LspClient, ClientCapabilities } from "dist/ts-lsp-client-dist/src/main"
|
30
30
|
const child_process_1 = require("child_process");
|
31
31
|
const fs = __importStar(require("fs"));
|
32
32
|
const path = __importStar(require("path"));
|
@@ -43,8 +43,8 @@ const extract = async (sketchPath) => {
|
|
43
43
|
const workspaceFolders = [{ 'name': 'context-extractor', 'uri': rootUri }];
|
44
44
|
// initialize LS client and server
|
45
45
|
const r = (0, child_process_1.spawn)('typescript-language-server', ['--stdio']);
|
46
|
-
const e = new
|
47
|
-
const c = new
|
46
|
+
const e = new main_js_1.JSONRPCEndpoint(r.stdin, r.stdout);
|
47
|
+
const c = new main_js_1.LspClient(e);
|
48
48
|
console.log(JSON.stringify(c));
|
49
49
|
const capabilities = {
|
50
50
|
'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-dist/src/main";
|
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-dist/src/main";
|
2
2
|
import { LanguageDriver, TypeSpanAndSourceFile } from "./types";
|
3
3
|
import { TypeScriptTypeChecker } from "./typescript-type-checker";
|
4
4
|
export declare class TypeScriptDriver implements LanguageDriver {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@jpoly1219/context-extractor",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.4",
|
4
4
|
"description": "Extract relevant context from an incomplete program sketch.",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -13,7 +13,7 @@
|
|
13
13
|
"dist/ts-lsp-client-dist"
|
14
14
|
],
|
15
15
|
"scripts": {
|
16
|
-
"build": "npx tsc",
|
16
|
+
"build": "mkdir dist/ && cp -r ts-lsp-client-dist dist/ && npx tsc",
|
17
17
|
"test": "echo \"Error: no test specified\" && exit 1"
|
18
18
|
},
|
19
19
|
"author": "",
|