open-agents-ai 0.184.59 → 0.184.61

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.
Files changed (2) hide show
  1. package/dist/index.js +46 -19
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -49450,15 +49450,20 @@ async function showCohereDashboard(ctx) {
49450
49450
  }
49451
49451
  }
49452
49452
  async function showModelPicker(ctx, local = false) {
49453
+ const BRAILLE_CYCLE = ["\u2800", "\u2840", "\u28C0", "\u28C4", "\u28E4", "\u28E6", "\u28F6", "\u28F7", "\u28FF", "\u28F7", "\u28F6", "\u28E6", "\u28E4", "\u28C4", "\u28C0", "\u2840"];
49454
+ let spinFrame = 0;
49455
+ const spinTimer = setInterval(() => {
49456
+ process.stdout.write(`\r ${c2.cyan("\u25CF")} Loading models ${c2.cyan(BRAILLE_CYCLE[spinFrame++ % BRAILLE_CYCLE.length])}`);
49457
+ }, 80);
49453
49458
  try {
49454
- const BRAILLE_CYCLE = ["\u2800", "\u2840", "\u28C0", "\u28C4", "\u28E4", "\u28E6", "\u28F6", "\u28F7", "\u28FF", "\u28F7", "\u28F6", "\u28E6", "\u28E4", "\u28C4", "\u28C0", "\u2840"];
49455
- let spinFrame = 0;
49456
- const spinTimer = setInterval(() => {
49457
- process.stdout.write(`\r ${c2.cyan("\u25CF")} Loading models ${c2.cyan(BRAILLE_CYCLE[spinFrame++ % BRAILLE_CYCLE.length])}`);
49458
- }, 80);
49459
- const models = await fetchModels(ctx.config.backendUrl, ctx.config.apiKey);
49460
- clearInterval(spinTimer);
49461
- process.stdout.write(`\r ${c2.green("\u2714")} ${models.length} models loaded${" ".repeat(20)}
49459
+ let models;
49460
+ try {
49461
+ models = await fetchModels(ctx.config.backendUrl, ctx.config.apiKey);
49462
+ } finally {
49463
+ clearInterval(spinTimer);
49464
+ process.stdout.write(`\r${" ".repeat(40)}\r`);
49465
+ }
49466
+ process.stdout.write(` ${c2.green("\u2714")} ${models.length} models loaded
49462
49467
  `);
49463
49468
  if (models.length === 0) {
49464
49469
  renderWarning("No models found.");
@@ -50680,9 +50685,10 @@ async function handleUpdate(subcommand, ctx) {
50680
50685
  const charIdx2 = noise2 < density2 ? Math.min(particles.length - 1, Math.floor(density2 * particles.length)) : 0;
50681
50686
  buf += `\x1B[${boxTop + r};${boxLeft + boxW - 1}H${particles[charIdx2]}`;
50682
50687
  }
50683
- const label = "INSTALLING";
50688
+ const label = statusLine === "__DONE__" ? "INSTALLED" : "INSTALLING";
50689
+ const labelColor = statusLine === "__DONE__" ? 82 : yellow;
50684
50690
  const labelCol = centerCol - Math.floor(label.length / 2);
50685
- buf += `\x1B[${centerRow - 1};${labelCol}H\x1B[1;38;5;${yellow}m${label}`;
50691
+ buf += `\x1B[${centerRow - 1};${labelCol}H\x1B[1;38;5;${labelColor}m${label}`;
50686
50692
  const vLabel = `v${version}`;
50687
50693
  const vCol = centerCol - Math.floor(vLabel.length / 2);
50688
50694
  buf += `\x1B[${centerRow};${vCol}H\x1B[0;38;5;245m\x1B[48;5;${bgDark}m${vLabel}`;
@@ -50707,8 +50713,26 @@ async function handleUpdate(subcommand, ctx) {
50707
50713
  },
50708
50714
  stop(finalText) {
50709
50715
  clearInterval(timer);
50710
- status = finalText;
50716
+ status = "__DONE__";
50711
50717
  renderInstallFrame(version, frame, status);
50718
+ setTimeout(() => {
50719
+ status = finalText;
50720
+ renderInstallFrame(version, frame + 1, finalText);
50721
+ }, 300);
50722
+ },
50723
+ /** Clear the overlay content area entirely — return to normal scroll area */
50724
+ dismiss() {
50725
+ clearInterval(timer);
50726
+ const cols = process.stdout.columns ?? 80;
50727
+ const rows = process.stdout.rows ?? 24;
50728
+ const contentTop = 4;
50729
+ const contentBottom = rows - 3;
50730
+ let buf = "\x1B7";
50731
+ for (let r = contentTop; r <= contentBottom; r++) {
50732
+ buf += `\x1B[${r};1H\x1B[48;5;234m\x1B[2K`;
50733
+ }
50734
+ buf += "\x1B8";
50735
+ process.stdout.write(buf);
50712
50736
  }
50713
50737
  };
50714
50738
  }
@@ -50870,7 +50894,8 @@ async function handleUpdate(subcommand, ctx) {
50870
50894
  }
50871
50895
  if (!installOk) {
50872
50896
  installOverlay.stop("Install failed");
50873
- await new Promise((r) => setTimeout(r, 1500));
50897
+ await new Promise((r) => setTimeout(r, 2e3));
50898
+ installOverlay.dismiss();
50874
50899
  renderWarning(`Try manually: ${sudoPrefix}npm i -g open-agents-ai`);
50875
50900
  return;
50876
50901
  }
@@ -50901,7 +50926,8 @@ async function handleUpdate(subcommand, ctx) {
50901
50926
  }
50902
50927
  if (!primaryUpdated && !depsUpdated && !doRebuild && !doPython && !doCloudflared) {
50903
50928
  installOverlay.stop("No changes needed");
50904
- await new Promise((r) => setTimeout(r, 1500));
50929
+ await new Promise((r) => setTimeout(r, 2e3));
50930
+ installOverlay.dismiss();
50905
50931
  return;
50906
50932
  }
50907
50933
  if (doRebuild) {
@@ -50973,17 +50999,18 @@ async function handleUpdate(subcommand, ctx) {
50973
50999
  ensureTranscribeCliBackground();
50974
51000
  }
50975
51001
  if (!primaryUpdated) {
50976
- installOverlay.stop("Done");
50977
- await new Promise((r) => setTimeout(r, 1500));
51002
+ installOverlay.stop("Done \u2014 no restart needed");
51003
+ await new Promise((r) => setTimeout(r, 2e3));
51004
+ installOverlay.dismiss();
50978
51005
  return;
50979
51006
  }
50980
- installOverlay.setStatus("Reloading...");
50981
- await new Promise((r) => setTimeout(r, 400));
50982
51007
  ctx.contextSave?.();
50983
51008
  const hadActiveTask = ctx.savePendingTaskState?.() ?? false;
50984
51009
  const resumeFlag = hadActiveTask ? "1" : "update-only";
50985
- installOverlay.stop("Reloading\u2026");
50986
- await new Promise((r) => setTimeout(r, 300));
51010
+ installOverlay.stop("Restarting with new version...");
51011
+ await new Promise((r) => setTimeout(r, 1500));
51012
+ installOverlay.dismiss();
51013
+ await new Promise((r) => setTimeout(r, 200));
50987
51014
  const { execPath, argv } = process;
50988
51015
  try {
50989
51016
  const { execFileSync } = await import("node:child_process");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.184.59",
3
+ "version": "0.184.61",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",