open-agents-ai 0.138.9 → 0.138.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.
Files changed (2) hide show
  1. package/dist/index.js +39 -31
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -44407,32 +44407,24 @@ function createDefaultBanner(version = "0.120.0") {
44407
44407
  const width = process.stdout.columns ?? 80;
44408
44408
  const rows = 3;
44409
44409
  const grid = [];
44410
- const bgColor = 208;
44411
- const fgDark = 236;
44412
- const fgText = 235;
44413
- const halftone = ["\u2588", "\u2593", "\u2592", "\u2591", " "];
44410
+ const textColor = 178;
44411
+ const shades = [" ", "\u2591", "\u2592", "\u2593", "\u2588"];
44414
44412
  for (let r = 0; r < rows; r++) {
44415
44413
  const row = [];
44416
44414
  for (let c3 = 0; c3 < width; c3++) {
44417
- const dist = Math.abs(c3 - width / 2) / (width / 2);
44418
- if (r === 1) {
44419
- row.push({ char: " ", fg: fgText, bg: bgColor, bold: false });
44420
- } else {
44421
- const htIdx = Math.min(halftone.length - 1, Math.floor(dist * halftone.length));
44422
- row.push({ char: halftone[htIdx], fg: bgColor, bg: 0, bold: false });
44423
- }
44415
+ const progress = c3 / (width - 1);
44416
+ const shadeIdx = Math.min(shades.length - 1, Math.floor(progress * shades.length));
44417
+ row.push({ char: shades[shadeIdx], fg: textColor, bg: 0, bold: false });
44424
44418
  }
44425
44419
  grid.push(row);
44426
44420
  }
44427
- const versionText = `OA v${version}`;
44428
- const hintText = " /help \xB7 /cohere \xB7 /voice";
44429
- const fullText = versionText + hintText;
44430
- const startCol = Math.max(2, Math.floor((width - fullText.length) / 2));
44431
- for (let i = 0; i < versionText.length && startCol + i < width; i++) {
44432
- grid[1][startCol + i] = { char: versionText[i], fg: fgDark, bg: bgColor, bold: true };
44421
+ const text = `OA v${version}`;
44422
+ const startCol = 2;
44423
+ for (let c3 = 0; c3 < Math.min(width, startCol + text.length + 2); c3++) {
44424
+ grid[1][c3] = { char: "\u2588", fg: textColor, bg: 0, bold: false };
44433
44425
  }
44434
- for (let i = 0; i < hintText.length && startCol + versionText.length + i < width; i++) {
44435
- grid[1][startCol + versionText.length + i] = { char: hintText[i], fg: 240, bg: bgColor, bold: false };
44426
+ for (let i = 0; i < text.length && startCol + i < width; i++) {
44427
+ grid[1][startCol + i] = { char: text[i], fg: 0, bg: textColor, bold: true };
44436
44428
  }
44437
44429
  return {
44438
44430
  id: "default-header",
@@ -52099,24 +52091,36 @@ var init_status_bar = __esm({
52099
52091
  if (!rl || !rl._ttyWrite)
52100
52092
  return;
52101
52093
  const origTtyWrite = rl._ttyWrite.bind(rl);
52102
- rl._ttyWrite = (s, key) => {
52103
- if (!this.active)
52094
+ const self = this;
52095
+ rl._ttyWrite = function(s, key) {
52096
+ if (!self.active)
52104
52097
  return origTtyWrite(s, key);
52105
52098
  const seq = s || "";
52099
+ if (seq.includes("[<64;") || seq.includes("\x1B[<64;")) {
52100
+ self.scrollContentUp(3);
52101
+ return;
52102
+ }
52103
+ if (seq.includes("[<65;") || seq.includes("\x1B[<65;")) {
52104
+ self.scrollContentDown(3);
52105
+ return;
52106
+ }
52106
52107
  if (key?.name === "pageup" || seq === "\x1B[5~") {
52107
- this.pageUpContent();
52108
+ self.pageUpContent();
52108
52109
  return;
52109
52110
  }
52110
52111
  if (key?.name === "pagedown" || seq === "\x1B[6~") {
52111
- this.pageDownContent();
52112
+ self.pageDownContent();
52112
52113
  return;
52113
52114
  }
52114
52115
  if (key?.shift && key?.name === "up" || seq === "\x1B[1;2A") {
52115
- this.scrollContentUp(3);
52116
+ self.scrollContentUp(3);
52116
52117
  return;
52117
52118
  }
52118
52119
  if (key?.shift && key?.name === "down" || seq === "\x1B[1;2B") {
52119
- this.scrollContentDown(3);
52120
+ self.scrollContentDown(3);
52121
+ return;
52122
+ }
52123
+ if (seq.includes("[<")) {
52120
52124
  return;
52121
52125
  }
52122
52126
  return origTtyWrite(s, key);
@@ -53312,9 +53316,9 @@ async function startInteractive(config, repoPath) {
53312
53316
  initOaDirectory(repoRoot);
53313
53317
  const savedSettings = resolveSettings(repoRoot);
53314
53318
  if (process.stdout.isTTY && !isResumed) {
53315
- process.stdout.write("\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l");
53319
+ process.stdout.write("\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l\x1B[?1002h\x1B[?1006h");
53316
53320
  const restoreScreen = () => {
53317
- process.stdout.write("\x1B[?25h\x1B[?1049l");
53321
+ process.stdout.write("\x1B[?1006l\x1B[?1002l\x1B[?25h\x1B[?1049l");
53318
53322
  };
53319
53323
  process.on("exit", restoreScreen);
53320
53324
  process.on("SIGINT", () => {
@@ -53389,9 +53393,9 @@ async function startInteractive(config, repoPath) {
53389
53393
  const version = getVersion3();
53390
53394
  if (isResumed) {
53391
53395
  if (process.stdout.isTTY) {
53392
- process.stdout.write("\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l");
53396
+ process.stdout.write("\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l\x1B[?1002h\x1B[?1006h");
53393
53397
  const restoreScreen = () => {
53394
- process.stdout.write("\x1B[?25h\x1B[?1049l");
53398
+ process.stdout.write("\x1B[?1006l\x1B[?1002l\x1B[?25h\x1B[?1049l");
53395
53399
  };
53396
53400
  process.on("exit", restoreScreen);
53397
53401
  process.on("SIGINT", () => {
@@ -53405,8 +53409,6 @@ async function startInteractive(config, repoPath) {
53405
53409
  }
53406
53410
  banner.setDesign(createDefaultBanner(version));
53407
53411
  carouselLines = banner.start();
53408
- const resumeMsg = hasTaskToResume ? `Updated to v${version} \u2014 picking up where you left off.` : `Updated to v${version}.`;
53409
- renderInfo(resumeMsg);
53410
53412
  } else {
53411
53413
  process.stdout.write("\x1B[H");
53412
53414
  banner.setDesign(createDefaultBanner(version));
@@ -53418,6 +53420,12 @@ async function startInteractive(config, repoPath) {
53418
53420
  const scrollTop = carouselLines > 0 ? carouselLines + 1 : 1;
53419
53421
  statusBar.activate(scrollTop);
53420
53422
  statusBar.setBannerRefresh(() => banner.renderCurrentFrame());
53423
+ if (isResumed) {
53424
+ statusBar.beginContentWrite();
53425
+ const resumeMsg = hasTaskToResume ? `Updated to v${version} \u2014 picking up where you left off.` : `Updated to v${version}.`;
53426
+ renderInfo(resumeMsg);
53427
+ statusBar.endContentWrite();
53428
+ }
53421
53429
  setContentWriteHook({
53422
53430
  begin: () => statusBar.beginContentWrite(),
53423
53431
  end: () => statusBar.endContentWrite(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.138.9",
3
+ "version": "0.138.10",
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",