scream-code 0.5.9 → 0.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -57507,6 +57507,7 @@ const SEVERITY_LABELS = [
|
|
|
57507
57507
|
"Information",
|
|
57508
57508
|
"Hint"
|
|
57509
57509
|
];
|
|
57510
|
+
const DEFAULT_REQUEST_TIMEOUT_MS$1 = 12e4;
|
|
57510
57511
|
var LspClient = class {
|
|
57511
57512
|
command;
|
|
57512
57513
|
workspaceRoot;
|
|
@@ -57546,6 +57547,11 @@ var LspClient = class {
|
|
|
57546
57547
|
this.notify("initialized", {});
|
|
57547
57548
|
}
|
|
57548
57549
|
async stop() {
|
|
57550
|
+
for (const { reject, timer } of this.pending.values()) {
|
|
57551
|
+
clearTimeout(timer);
|
|
57552
|
+
reject(/* @__PURE__ */ new Error("LSP client stopped"));
|
|
57553
|
+
}
|
|
57554
|
+
this.pending.clear();
|
|
57549
57555
|
if (this.process === void 0) return;
|
|
57550
57556
|
try {
|
|
57551
57557
|
this.notify("shutdown", {});
|
|
@@ -57603,9 +57609,14 @@ var LspClient = class {
|
|
|
57603
57609
|
request(method, params) {
|
|
57604
57610
|
const id = this.nextId++;
|
|
57605
57611
|
return new Promise((resolve, reject) => {
|
|
57612
|
+
const timer = setTimeout(() => {
|
|
57613
|
+
this.pending.delete(id);
|
|
57614
|
+
reject(/* @__PURE__ */ new Error(`LSP request '${method}' timed out after ${DEFAULT_REQUEST_TIMEOUT_MS$1}ms`));
|
|
57615
|
+
}, DEFAULT_REQUEST_TIMEOUT_MS$1);
|
|
57606
57616
|
this.pending.set(id, {
|
|
57607
57617
|
resolve,
|
|
57608
|
-
reject
|
|
57618
|
+
reject,
|
|
57619
|
+
timer
|
|
57609
57620
|
});
|
|
57610
57621
|
this.send({
|
|
57611
57622
|
id,
|
|
@@ -57651,6 +57662,7 @@ var LspClient = class {
|
|
|
57651
57662
|
if (message.id !== void 0) {
|
|
57652
57663
|
const pending = this.pending.get(message.id);
|
|
57653
57664
|
if (pending === void 0) return;
|
|
57665
|
+
clearTimeout(pending.timer);
|
|
57654
57666
|
this.pending.delete(message.id);
|
|
57655
57667
|
if (message.error !== void 0) pending.reject(new Error(message.error.message));
|
|
57656
57668
|
else pending.resolve(message.result);
|
|
@@ -57664,6 +57676,12 @@ var LspClient = class {
|
|
|
57664
57676
|
};
|
|
57665
57677
|
function pathToUri(path) {
|
|
57666
57678
|
if (path.startsWith("file://")) return path;
|
|
57679
|
+
const windowsDriveMatch = /^([A-Za-z]):[\\/]/.exec(path);
|
|
57680
|
+
if (windowsDriveMatch !== null) {
|
|
57681
|
+
const drive = windowsDriveMatch[1].toUpperCase();
|
|
57682
|
+
const rest = path.slice(windowsDriveMatch[0].length).replaceAll("\\", "/");
|
|
57683
|
+
return `file:///${drive}:${rest.startsWith("/") ? rest : `/${rest}`}`;
|
|
57684
|
+
}
|
|
57667
57685
|
return `file://${path.startsWith("/") ? path : `/${path}`}`;
|
|
57668
57686
|
}
|
|
57669
57687
|
function sleep$1(ms) {
|
package/dist/main.mjs
CHANGED
|
@@ -6,7 +6,7 @@ const __dirname = __cjsShimDirname(__filename);
|
|
|
6
6
|
import "./suppress-sqlite-warning-C2VB0doZ.mjs";
|
|
7
7
|
//#region src/main.ts
|
|
8
8
|
try {
|
|
9
|
-
(await import("./app-
|
|
9
|
+
(await import("./app-PvbGwA6S.mjs")).main();
|
|
10
10
|
} catch (error) {
|
|
11
11
|
process.stderr.write(`${error instanceof Error ? error.stack ?? error.message : String(error)}\n`);
|
|
12
12
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scream-code",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.10",
|
|
4
4
|
"description": "A terminal-native AI agent for builders",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ScreamCli",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public",
|
|
43
|
-
"provenance":
|
|
43
|
+
"provenance": false
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "tsdown",
|