open-agents-ai 0.138.16 → 0.138.17
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 +29 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -44426,24 +44426,42 @@ function createDefaultBanner(version = "0.120.0") {
|
|
|
44426
44426
|
const width = process.stdout.columns ?? 80;
|
|
44427
44427
|
const rows = 3;
|
|
44428
44428
|
const grid = [];
|
|
44429
|
-
const
|
|
44430
|
-
const
|
|
44429
|
+
const yellow = 178;
|
|
44430
|
+
const blockChars = [" ", "\xB7", "\u2591", "\u2592", "\u2593", "\u2588"];
|
|
44431
|
+
const hash = (r, c3) => (r * 7 + c3 * 13 + 37) % 17 / 17;
|
|
44431
44432
|
for (let r = 0; r < rows; r++) {
|
|
44432
44433
|
const row = [];
|
|
44433
44434
|
for (let c3 = 0; c3 < width; c3++) {
|
|
44434
|
-
const
|
|
44435
|
-
|
|
44436
|
-
|
|
44435
|
+
const midpoint = Math.floor(width * 0.5);
|
|
44436
|
+
if (c3 >= midpoint) {
|
|
44437
|
+
const progress = (c3 - midpoint) / (width - midpoint - 1);
|
|
44438
|
+
const density = progress * progress;
|
|
44439
|
+
const noise = hash(r, c3);
|
|
44440
|
+
if (noise < density) {
|
|
44441
|
+
const charIdx = Math.min(blockChars.length - 1, Math.floor(density * blockChars.length));
|
|
44442
|
+
row.push({ char: blockChars[charIdx], fg: yellow, bg: 0, bold: false });
|
|
44443
|
+
} else {
|
|
44444
|
+
row.push({ char: " ", fg: 0, bg: 0, bold: false });
|
|
44445
|
+
}
|
|
44446
|
+
} else {
|
|
44447
|
+
row.push({ char: " ", fg: 0, bg: 0, bold: false });
|
|
44448
|
+
}
|
|
44437
44449
|
}
|
|
44438
44450
|
grid.push(row);
|
|
44439
44451
|
}
|
|
44440
|
-
const
|
|
44441
|
-
|
|
44442
|
-
|
|
44443
|
-
grid[1][c3] = { char: "\u2588", fg: textColor, bg: 0, bold: false };
|
|
44452
|
+
const versionText = ` OA v${version}`;
|
|
44453
|
+
for (let i = 0; i < versionText.length && i < width; i++) {
|
|
44454
|
+
grid[0][i] = { char: versionText[i], fg: yellow, bg: 0, bold: true };
|
|
44444
44455
|
}
|
|
44445
|
-
|
|
44446
|
-
|
|
44456
|
+
const cwd4 = process.cwd();
|
|
44457
|
+
const shortCwd = cwd4.length > 40 ? "..." + cwd4.slice(-37) : cwd4;
|
|
44458
|
+
const infoText = ` ${shortCwd}`;
|
|
44459
|
+
for (let i = 0; i < infoText.length && i < Math.floor(width * 0.5); i++) {
|
|
44460
|
+
grid[1][i] = { char: infoText[i], fg: 245, bg: 0, bold: false };
|
|
44461
|
+
}
|
|
44462
|
+
const hints = " /help /voice /cohere /model";
|
|
44463
|
+
for (let i = 0; i < hints.length && i < Math.floor(width * 0.5); i++) {
|
|
44464
|
+
grid[2][i] = { char: hints[i], fg: 240, bg: 0, bold: false };
|
|
44447
44465
|
}
|
|
44448
44466
|
return {
|
|
44449
44467
|
id: "default-header",
|
package/package.json
CHANGED