open-agents-ai 0.184.98 → 0.185.0
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.
- package/dist/index.js +47 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -62487,6 +62487,15 @@ var init_mouse_filter = __esm({
|
|
|
62487
62487
|
i += mouseMatch[0].length;
|
|
62488
62488
|
continue;
|
|
62489
62489
|
}
|
|
62490
|
+
if (remaining.startsWith("\x1B[M")) {
|
|
62491
|
+
if (remaining.length >= 6) {
|
|
62492
|
+
if (this.onActivity)
|
|
62493
|
+
this.onActivity();
|
|
62494
|
+
i += 6;
|
|
62495
|
+
continue;
|
|
62496
|
+
}
|
|
62497
|
+
break;
|
|
62498
|
+
}
|
|
62490
62499
|
if (remaining.startsWith("\x1B[<") && remaining.length < 15) {
|
|
62491
62500
|
break;
|
|
62492
62501
|
}
|
|
@@ -62509,8 +62518,15 @@ var init_mouse_filter = __esm({
|
|
|
62509
62518
|
clearTimeout(this.flushTimer);
|
|
62510
62519
|
this.flushTimer = setTimeout(() => {
|
|
62511
62520
|
if (this.buffer.length > 0) {
|
|
62512
|
-
this.
|
|
62513
|
-
|
|
62521
|
+
if (this.buffer.startsWith("\x1B[<") || this.buffer.startsWith("\x1B[M")) {
|
|
62522
|
+
this.buffer = "";
|
|
62523
|
+
} else if (this.buffer === "\x1B" || this.buffer === "\x1B[") {
|
|
62524
|
+
this.push(this.buffer);
|
|
62525
|
+
this.buffer = "";
|
|
62526
|
+
} else {
|
|
62527
|
+
this.push(this.buffer);
|
|
62528
|
+
this.buffer = "";
|
|
62529
|
+
}
|
|
62514
62530
|
}
|
|
62515
62531
|
}, 50);
|
|
62516
62532
|
}
|
|
@@ -62653,6 +62669,22 @@ var init_direct_input = __esm({
|
|
|
62653
62669
|
if (remaining.startsWith("\x1B[<") && remaining.length < 15) {
|
|
62654
62670
|
break;
|
|
62655
62671
|
}
|
|
62672
|
+
if (remaining.startsWith("\x1B[M") && remaining.length >= 6) {
|
|
62673
|
+
i += 6;
|
|
62674
|
+
continue;
|
|
62675
|
+
}
|
|
62676
|
+
if (remaining.startsWith("\x1B[M") && remaining.length < 6) {
|
|
62677
|
+
break;
|
|
62678
|
+
}
|
|
62679
|
+
if (remaining.startsWith("\x1B[<")) {
|
|
62680
|
+
let end = 3;
|
|
62681
|
+
while (end < remaining.length && remaining[end] !== "M" && remaining[end] !== "m")
|
|
62682
|
+
end++;
|
|
62683
|
+
if (end < remaining.length)
|
|
62684
|
+
end++;
|
|
62685
|
+
i += end;
|
|
62686
|
+
continue;
|
|
62687
|
+
}
|
|
62656
62688
|
const csiMatch = remaining.match(/^\x1B\[([0-9;]*)([A-Za-z~])/);
|
|
62657
62689
|
if (csiMatch) {
|
|
62658
62690
|
this._handleCSI(csiMatch[1], csiMatch[2]);
|
|
@@ -66584,6 +66616,8 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
66584
66616
|
}
|
|
66585
66617
|
}
|
|
66586
66618
|
function writeContent(fn) {
|
|
66619
|
+
if (!statusBar.isActive)
|
|
66620
|
+
return;
|
|
66587
66621
|
if (isNeovimActive()) {
|
|
66588
66622
|
const origWrite = process.stdout.write;
|
|
66589
66623
|
let captured = "";
|
|
@@ -66628,6 +66662,8 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
66628
66662
|
}
|
|
66629
66663
|
}
|
|
66630
66664
|
async function writeContentAsync(fn) {
|
|
66665
|
+
if (!statusBar.isActive)
|
|
66666
|
+
return fn();
|
|
66631
66667
|
if (isNeovimActive()) {
|
|
66632
66668
|
const origWrite = process.stdout.write;
|
|
66633
66669
|
let captured = "";
|
|
@@ -66855,19 +66891,14 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
66855
66891
|
}
|
|
66856
66892
|
}
|
|
66857
66893
|
if (best) {
|
|
66858
|
-
writeContent(() => {
|
|
66859
|
-
renderInfo(`No local Ollama detected. Auto-connecting to sponsored inference: ${best.name}`);
|
|
66860
|
-
renderInfo(`Endpoint: ${best.tunnelUrl}`);
|
|
66861
|
-
renderInfo(`Models: ${best.models?.slice(0, 3).join(", ") || "available"}`);
|
|
66862
|
-
renderInfo(`Change anytime: /endpoint or /endpoint sponsor`);
|
|
66863
|
-
});
|
|
66864
66894
|
currentConfig.backendUrl = best.tunnelUrl;
|
|
66865
66895
|
currentConfig.apiKey = bestNoAuth ? "" : best.authKey;
|
|
66866
66896
|
currentConfig.backendType = "openai";
|
|
66867
|
-
|
|
66868
|
-
|
|
66869
|
-
|
|
66870
|
-
|
|
66897
|
+
setTimeout(() => {
|
|
66898
|
+
if (statusBar.isActive) {
|
|
66899
|
+
writeContent(() => renderInfo(`Connected to sponsored endpoint: ${best.name}`));
|
|
66900
|
+
}
|
|
66901
|
+
}, 2e3);
|
|
66871
66902
|
}
|
|
66872
66903
|
}
|
|
66873
66904
|
} catch {
|
|
@@ -66887,7 +66918,10 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
66887
66918
|
ollamaUrl: currentConfig.backendUrl || "http://127.0.0.1:11434"
|
|
66888
66919
|
});
|
|
66889
66920
|
apiServer.on?.("listening", () => {
|
|
66890
|
-
|
|
66921
|
+
setTimeout(() => {
|
|
66922
|
+
if (statusBar.isActive)
|
|
66923
|
+
writeContent(() => renderInfo(`REST API: http://localhost:${apiPort}`));
|
|
66924
|
+
}, 1500);
|
|
66891
66925
|
});
|
|
66892
66926
|
apiServer.on?.("error", () => {
|
|
66893
66927
|
});
|
package/package.json
CHANGED