open-agents-ai 0.187.49 → 0.187.50
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 +61 -47
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -292770,48 +292770,6 @@ var init_banner = __esm({
|
|
|
292770
292770
|
buf += `\x1B[${r2 + 1};1H\x1B[38;5;178m\x1B[48;5;0m${ch}\x1B[0m`;
|
|
292771
292771
|
}
|
|
292772
292772
|
}
|
|
292773
|
-
if (this._updateAvailable && this.currentDesign?.type === "default") {
|
|
292774
|
-
this._pulseFrame++;
|
|
292775
|
-
const t2 = (Math.sin(this._pulseFrame * 0.16) + 1) / 2;
|
|
292776
|
-
const ramp = [240, 241, 243, 245, 247, 249, 180, 178];
|
|
292777
|
-
const versionIdx = Math.round(t2 * (ramp.length - 1));
|
|
292778
|
-
const updateIdx = Math.round((1 - t2) * (ramp.length - 1));
|
|
292779
|
-
const versionFg = ramp[versionIdx];
|
|
292780
|
-
const updateFg = ramp[updateIdx];
|
|
292781
|
-
const bgDark = 0;
|
|
292782
|
-
const storedVersion = this.currentDesign.version ?? "";
|
|
292783
|
-
const vText = ` OA v${storedVersion}`;
|
|
292784
|
-
const vStart = 3;
|
|
292785
|
-
const vLen = vText.length;
|
|
292786
|
-
buf += `\x1B[1;${vStart}H\x1B[1;38;5;${versionFg}m\x1B[48;5;${bgDark}m`;
|
|
292787
|
-
for (let c4 = vStart - 1; c4 < vStart - 1 + vLen && c4 < this.width; c4++) {
|
|
292788
|
-
const cell = frame.grid[0]?.[c4];
|
|
292789
|
-
if (cell)
|
|
292790
|
-
buf += cell.char;
|
|
292791
|
-
}
|
|
292792
|
-
const badge = " UPDATE ";
|
|
292793
|
-
const badgeStart = vStart + vLen;
|
|
292794
|
-
if (badgeStart + badge.length < this.width) {
|
|
292795
|
-
buf += `\x1B]8;;oa-cmd:/update\x07`;
|
|
292796
|
-
buf += `\x1B[1;${badgeStart}H\x1B[1;38;5;${updateFg}m\x1B[48;5;0m${badge}`;
|
|
292797
|
-
buf += `\x1B]8;;\x07`;
|
|
292798
|
-
const mnemonicStartCol = badgeStart + badge.length;
|
|
292799
|
-
const gridRow = frame.grid[0];
|
|
292800
|
-
if (gridRow) {
|
|
292801
|
-
const origMnemonicStart = vStart - 1 + vLen;
|
|
292802
|
-
let mnBuf = `\x1B[1;${mnemonicStartCol}H\x1B[0;38;5;240m\x1B[48;5;${bgDark}m`;
|
|
292803
|
-
for (let c4 = origMnemonicStart; c4 < gridRow.length && c4 < Math.floor(this.width * 0.44); c4++) {
|
|
292804
|
-
const cell = gridRow[c4];
|
|
292805
|
-
if (cell && cell.char !== " " && !cell.bold)
|
|
292806
|
-
mnBuf += cell.char;
|
|
292807
|
-
else if (cell)
|
|
292808
|
-
mnBuf += cell.char;
|
|
292809
|
-
}
|
|
292810
|
-
buf += mnBuf;
|
|
292811
|
-
}
|
|
292812
|
-
}
|
|
292813
|
-
buf += "\x1B[0m";
|
|
292814
|
-
}
|
|
292815
292773
|
buf += "\x1B[0m";
|
|
292816
292774
|
try {
|
|
292817
292775
|
process.stdout.write(buf);
|
|
@@ -299574,6 +299532,12 @@ var init_status_bar = __esm({
|
|
|
299574
299532
|
_suggestions = [];
|
|
299575
299533
|
/** Currently highlighted suggestion index (-1 = none) */
|
|
299576
299534
|
_suggestIndex = -1;
|
|
299535
|
+
/** Whether suggestions were triggered by direct typing (instant) vs history navigation (delayed) */
|
|
299536
|
+
_suggestFromHistory = false;
|
|
299537
|
+
/** Timer for delayed suggestion trigger on history navigation */
|
|
299538
|
+
_suggestDelayTimer = null;
|
|
299539
|
+
/** Whether suggestions were manually dismissed via Esc */
|
|
299540
|
+
_suggestDismissed = false;
|
|
299577
299541
|
/** Callback to get available slash commands for suggestion matching */
|
|
299578
299542
|
_commandListProvider = null;
|
|
299579
299543
|
/** Callback to apply a selected suggestion to the input line */
|
|
@@ -300372,9 +300336,17 @@ var init_status_bar = __esm({
|
|
|
300372
300336
|
this._suggestions = [];
|
|
300373
300337
|
return;
|
|
300374
300338
|
}
|
|
300339
|
+
if (this._suggestDismissed) {
|
|
300340
|
+
this._suggestions = [];
|
|
300341
|
+
return;
|
|
300342
|
+
}
|
|
300375
300343
|
const { line } = this.inputStateProvider();
|
|
300376
300344
|
if (!line.startsWith("/") || line.length < 2 || line.includes(" ")) {
|
|
300377
300345
|
this._suggestions = [];
|
|
300346
|
+
this._suggestDismissed = false;
|
|
300347
|
+
return;
|
|
300348
|
+
}
|
|
300349
|
+
if (this._suggestFromHistory) {
|
|
300378
300350
|
return;
|
|
300379
300351
|
}
|
|
300380
300352
|
const query = line.slice(1).toLowerCase();
|
|
@@ -300385,6 +300357,40 @@ var init_status_bar = __esm({
|
|
|
300385
300357
|
}
|
|
300386
300358
|
this._suggestions = matches;
|
|
300387
300359
|
}
|
|
300360
|
+
/** Dismiss suggestions (Esc key) */
|
|
300361
|
+
dismissSuggestions() {
|
|
300362
|
+
this._suggestions = [];
|
|
300363
|
+
this._suggestIndex = -1;
|
|
300364
|
+
this._suggestDismissed = true;
|
|
300365
|
+
if (this._suggestDelayTimer) {
|
|
300366
|
+
clearTimeout(this._suggestDelayTimer);
|
|
300367
|
+
this._suggestDelayTimer = null;
|
|
300368
|
+
}
|
|
300369
|
+
if (this.active)
|
|
300370
|
+
this.renderFooterAndPositionInput();
|
|
300371
|
+
}
|
|
300372
|
+
/** Notify that input changed via history navigation (up/down arrow) */
|
|
300373
|
+
notifyHistoryNavigation() {
|
|
300374
|
+
this._suggestFromHistory = true;
|
|
300375
|
+
this._suggestDismissed = false;
|
|
300376
|
+
if (this._suggestDelayTimer)
|
|
300377
|
+
clearTimeout(this._suggestDelayTimer);
|
|
300378
|
+
this._suggestDelayTimer = setTimeout(() => {
|
|
300379
|
+
this._suggestFromHistory = false;
|
|
300380
|
+
this._suggestDelayTimer = null;
|
|
300381
|
+
if (this.active)
|
|
300382
|
+
this.renderFooterAndPositionInput();
|
|
300383
|
+
}, 2e3);
|
|
300384
|
+
}
|
|
300385
|
+
/** Notify that input changed via direct typing (keyboard) */
|
|
300386
|
+
notifyDirectInput() {
|
|
300387
|
+
this._suggestFromHistory = false;
|
|
300388
|
+
this._suggestDismissed = false;
|
|
300389
|
+
if (this._suggestDelayTimer) {
|
|
300390
|
+
clearTimeout(this._suggestDelayTimer);
|
|
300391
|
+
this._suggestDelayTimer = null;
|
|
300392
|
+
}
|
|
300393
|
+
}
|
|
300388
300394
|
/** Cycle focus: footer → header → content → footer */
|
|
300389
300395
|
cycleFocus() {
|
|
300390
300396
|
const order = ["footer", "header", "content"];
|
|
@@ -301322,7 +301328,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
301322
301328
|
updateFooterHeight(termWidth) {
|
|
301323
301329
|
this._updateSuggestions();
|
|
301324
301330
|
const inputLines = this.computeInputLineCount(termWidth);
|
|
301325
|
-
const suggestionRows = this._suggestions.length > 0 ? this._suggestions.length : 1;
|
|
301331
|
+
const suggestionRows = this._suggestions.length > 0 ? this._suggestions.length + 1 : 1;
|
|
301326
301332
|
const newHeight = 1 + 1 + inputLines + suggestionRows;
|
|
301327
301333
|
if (newHeight !== this._currentFooterHeight) {
|
|
301328
301334
|
this._currentFooterHeight = newHeight;
|
|
@@ -301334,7 +301340,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
301334
301340
|
footerHeightChanged(termWidth) {
|
|
301335
301341
|
this._updateSuggestions();
|
|
301336
301342
|
const inputLines = this.computeInputLineCount(termWidth);
|
|
301337
|
-
const suggestionRows = this._suggestions.length > 0 ? this._suggestions.length : 1;
|
|
301343
|
+
const suggestionRows = this._suggestions.length > 0 ? this._suggestions.length + 1 : 1;
|
|
301338
301344
|
return 1 + 1 + inputLines + suggestionRows !== this._currentFooterHeight;
|
|
301339
301345
|
}
|
|
301340
301346
|
/** Compute absolute row positions for all footer elements.
|
|
@@ -301477,10 +301483,13 @@ ${CONTENT_BG_SEQ}`);
|
|
|
301477
301483
|
const fg2 = isHighlighted ? `\x1B[1;38;5;${TEXT_PRIMARY}m` : `\x1B[38;5;${TEXT_PRIMARY}m`;
|
|
301478
301484
|
const slash = isHighlighted ? `\x1B[38;5;245m` : `\x1B[38;5;${TEXT_DIM}m`;
|
|
301479
301485
|
const marker = isHighlighted ? `\x1B[38;5;${TEXT_PRIMARY}m\u203A ` : " ";
|
|
301480
|
-
buf += `\x1B[${row};1H${
|
|
301481
|
-
buf += `${bg}${marker}${slash}/${fg2}${cmd}`;
|
|
301482
|
-
buf += `${
|
|
301486
|
+
buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_V}${RESET}`;
|
|
301487
|
+
buf += `${bg} ${marker}${slash}/${fg2}${cmd}`;
|
|
301488
|
+
buf += `${PANEL_BG_SEQ}\x1B[K`;
|
|
301489
|
+
buf += `\x1B[${row};${w}H${BOX_FG}${BOX_V}${RESET}`;
|
|
301483
301490
|
}
|
|
301491
|
+
const suggestBottomRow = pos.suggestStartRow + this._suggestions.length;
|
|
301492
|
+
buf += `\x1B[${suggestBottomRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL}${BOX_H.repeat(Math.max(0, boxInner))}${BOX_BR}${RESET}`;
|
|
301484
301493
|
} else {
|
|
301485
301494
|
buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL}${BOX_H.repeat(Math.max(0, boxInner))}${BOX_BR}${RESET}`;
|
|
301486
301495
|
}
|
|
@@ -301680,6 +301689,10 @@ ${CONTENT_BG_SEQ}`);
|
|
|
301680
301689
|
if (key?.name === "escape" || s2 === "\x1B") {
|
|
301681
301690
|
sawEscape = true;
|
|
301682
301691
|
sawEscapeTime = Date.now();
|
|
301692
|
+
if (self2._suggestions.length > 0) {
|
|
301693
|
+
self2.dismissSuggestions();
|
|
301694
|
+
return;
|
|
301695
|
+
}
|
|
301683
301696
|
if (onEscape && s2.length === 1)
|
|
301684
301697
|
onEscape();
|
|
301685
301698
|
return;
|
|
@@ -301719,6 +301732,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
301719
301732
|
self2.scrollContentDown(1);
|
|
301720
301733
|
return;
|
|
301721
301734
|
}
|
|
301735
|
+
self2.notifyHistoryNavigation();
|
|
301722
301736
|
return origTtyWrite(s2, key);
|
|
301723
301737
|
}
|
|
301724
301738
|
if (key?.name === "pageup" || s2 === "\x1B[5~") {
|
package/package.json
CHANGED