open-agents-ai 0.185.10 → 0.185.12
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 +92 -19
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49849,7 +49849,9 @@ async function showModelPicker(ctx, local = false) {
|
|
|
49849
49849
|
try {
|
|
49850
49850
|
let models;
|
|
49851
49851
|
try {
|
|
49852
|
-
|
|
49852
|
+
const fetchPromise = fetchModels(ctx.config.backendUrl, ctx.config.apiKey);
|
|
49853
|
+
const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error(`Timed out fetching models from ${ctx.config.backendUrl} (10s). The endpoint may be down. Use /endpoint to switch.`)), 1e4));
|
|
49854
|
+
models = await Promise.race([fetchPromise, timeoutPromise]);
|
|
49853
49855
|
} finally {
|
|
49854
49856
|
clearInterval(spinTimer);
|
|
49855
49857
|
process.stdout.write(`\r${" ".repeat(40)}\r`);
|
|
@@ -51537,8 +51539,8 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
51537
51539
|
}
|
|
51538
51540
|
const { spawn: spawnChild } = await import("node:child_process");
|
|
51539
51541
|
const child = spawnChild("sh", [scriptPath2], {
|
|
51540
|
-
stdio: "
|
|
51541
|
-
//
|
|
51542
|
+
stdio: "inherit",
|
|
51543
|
+
// inherit terminal (needed for oa's TUI)
|
|
51542
51544
|
detached: true,
|
|
51543
51545
|
// new process group
|
|
51544
51546
|
env: { ...process.env, __OA_RESUMED: resumeFlag }
|
|
@@ -53282,7 +53284,37 @@ function createDefaultBanner(version = "0.120.0") {
|
|
|
53282
53284
|
const rows = 3;
|
|
53283
53285
|
const yellow = 178;
|
|
53284
53286
|
const bgDark = 234;
|
|
53285
|
-
const particles = [
|
|
53287
|
+
const particles = [
|
|
53288
|
+
" ",
|
|
53289
|
+
// 0: empty
|
|
53290
|
+
"\u2801",
|
|
53291
|
+
"\u2802",
|
|
53292
|
+
// 1-2: sparse braille
|
|
53293
|
+
"\u2596",
|
|
53294
|
+
"\u2597",
|
|
53295
|
+
// 3-4: ▖▗ single quadrants
|
|
53296
|
+
"\u2598",
|
|
53297
|
+
"\u259D",
|
|
53298
|
+
// 5-6: ▘▝ upper quadrants
|
|
53299
|
+
"\u259E",
|
|
53300
|
+
"\u259A",
|
|
53301
|
+
// 7-8: ▞▚ diagonals
|
|
53302
|
+
"\xB7",
|
|
53303
|
+
"\u2591",
|
|
53304
|
+
// 9-10: · ░ (dot + light shade)
|
|
53305
|
+
"\u2599",
|
|
53306
|
+
"\u259B",
|
|
53307
|
+
// 11-12: ▙▛ three-quarter fills
|
|
53308
|
+
"\u2592",
|
|
53309
|
+
// 13: ▒ medium shade
|
|
53310
|
+
"\u259C",
|
|
53311
|
+
"\u259F",
|
|
53312
|
+
// 14-15: ▜▟ three-quarter fills
|
|
53313
|
+
"\u2593",
|
|
53314
|
+
// 16: ▓ dark shade
|
|
53315
|
+
"\u2588"
|
|
53316
|
+
// 17: █ full block
|
|
53317
|
+
];
|
|
53286
53318
|
const hash = (r, c3, frame) => {
|
|
53287
53319
|
const x = r * 7 + c3 * 13 + frame * 3 + 37;
|
|
53288
53320
|
return (x * x * 31 + x * 17 + 59) % 97 / 97;
|
|
@@ -53711,9 +53743,22 @@ var init_banner = __esm({
|
|
|
53711
53743
|
}
|
|
53712
53744
|
}
|
|
53713
53745
|
if (this._focused) {
|
|
53714
|
-
const
|
|
53746
|
+
const FOCUS = [
|
|
53747
|
+
"\u2596",
|
|
53748
|
+
"\u259A",
|
|
53749
|
+
"\u2599",
|
|
53750
|
+
"\u259B",
|
|
53751
|
+
"\u2588",
|
|
53752
|
+
// ▖▚▙▛█ (build up)
|
|
53753
|
+
"\u259C",
|
|
53754
|
+
"\u259F",
|
|
53755
|
+
"\u259E",
|
|
53756
|
+
"\u2597",
|
|
53757
|
+
"\xB7"
|
|
53758
|
+
// ▜▟▞▗· (fade down)
|
|
53759
|
+
];
|
|
53715
53760
|
for (let r = 0; r < this.rows; r++) {
|
|
53716
|
-
const ch =
|
|
53761
|
+
const ch = FOCUS[(this.frameTick + r * 3) % FOCUS.length];
|
|
53717
53762
|
buf += `\x1B[${r + 1};1H\x1B[38;5;178m\x1B[48;5;234m${ch}\x1B[0m`;
|
|
53718
53763
|
}
|
|
53719
53764
|
}
|
|
@@ -60996,19 +61041,47 @@ var init_status_bar = __esm({
|
|
|
60996
61041
|
*/
|
|
60997
61042
|
_getFocusQuadrant() {
|
|
60998
61043
|
this._focusFrame++;
|
|
60999
|
-
const
|
|
61000
|
-
|
|
61001
|
-
|
|
61002
|
-
|
|
61003
|
-
|
|
61004
|
-
|
|
61005
|
-
|
|
61006
|
-
|
|
61007
|
-
|
|
61008
|
-
|
|
61009
|
-
|
|
61010
|
-
|
|
61011
|
-
|
|
61044
|
+
const DENSITY2 = [
|
|
61045
|
+
" ",
|
|
61046
|
+
// 0: empty
|
|
61047
|
+
"\xB7",
|
|
61048
|
+
// 1: · middle dot
|
|
61049
|
+
"\u2596",
|
|
61050
|
+
// 2: ▖ single quadrant
|
|
61051
|
+
"\u259E",
|
|
61052
|
+
// 3: ▞ diagonal (2 quadrants)
|
|
61053
|
+
"\u259A",
|
|
61054
|
+
// 4: ▚ other diagonal
|
|
61055
|
+
"\u2599",
|
|
61056
|
+
// 5: ▙ three quadrants
|
|
61057
|
+
"\u259B",
|
|
61058
|
+
// 6: ▛ three quadrants
|
|
61059
|
+
"\u259C",
|
|
61060
|
+
// 7: ▜ three quadrants
|
|
61061
|
+
"\u259F",
|
|
61062
|
+
// 8: ▟ three quadrants
|
|
61063
|
+
"\u2593",
|
|
61064
|
+
// 9: ▓ dark shade
|
|
61065
|
+
"\u2588"
|
|
61066
|
+
// 10: █ full block
|
|
61067
|
+
];
|
|
61068
|
+
if (this._focusFrame < 4)
|
|
61069
|
+
return DENSITY2[10];
|
|
61070
|
+
const m = this._unifiedMetrics ?? getInstantSnapshot();
|
|
61071
|
+
const cpu = m.hardware.cpuUtil;
|
|
61072
|
+
const gpu = m.hardware.gpuUtil;
|
|
61073
|
+
const mem = m.hardware.memUtil;
|
|
61074
|
+
const netRx = m.network.rxBytesPerSec;
|
|
61075
|
+
const netTx = m.network.txBytesPerSec;
|
|
61076
|
+
const gpuNorm = gpu >= 0 ? gpu / 100 : 0;
|
|
61077
|
+
const intensity = Math.min(1, cpu / 100 * 0.3 + gpuNorm * 0.3 + mem / 100 * 0.2 + Math.min(1, (netRx + netTx) / 5e7) * 0.2);
|
|
61078
|
+
const baseDensity = Math.floor(intensity * 6);
|
|
61079
|
+
const range = 4;
|
|
61080
|
+
const phase = this._focusFrame * 0.15 + cpu / 50 * Math.sin(this._focusFrame * 0.05);
|
|
61081
|
+
const wave = Math.sin(phase) * 0.5 + 0.5;
|
|
61082
|
+
const idx = Math.round(baseDensity + wave * range);
|
|
61083
|
+
const clampedIdx = Math.max(0, Math.min(DENSITY2.length - 1, idx));
|
|
61084
|
+
return DENSITY2[clampedIdx];
|
|
61012
61085
|
}
|
|
61013
61086
|
/** Set the provider for slash command names (used for inline suggestions) */
|
|
61014
61087
|
setCommandListProvider(provider) {
|
package/package.json
CHANGED