open-agents-ai 0.148.0 → 0.149.0
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 +31 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -55613,6 +55613,19 @@ function copyText(text) {
|
|
|
55613
55613
|
continue;
|
|
55614
55614
|
}
|
|
55615
55615
|
}
|
|
55616
|
+
if (!_clipboardAutoInstallAttempted) {
|
|
55617
|
+
_clipboardAutoInstallAttempted = true;
|
|
55618
|
+
try {
|
|
55619
|
+
execSync29("which apt-get", { timeout: 2e3, stdio: "pipe" });
|
|
55620
|
+
try {
|
|
55621
|
+
execSync29("sudo -n apt-get install -y xclip 2>/dev/null", { timeout: 15e3, stdio: "pipe" });
|
|
55622
|
+
execSync29("xclip -selection clipboard", { input: text, timeout: 3e3 });
|
|
55623
|
+
return true;
|
|
55624
|
+
} catch {
|
|
55625
|
+
}
|
|
55626
|
+
} catch {
|
|
55627
|
+
}
|
|
55628
|
+
}
|
|
55616
55629
|
} catch {
|
|
55617
55630
|
}
|
|
55618
55631
|
try {
|
|
@@ -55695,7 +55708,7 @@ function hitTestHeaderButton(row, col, termWidth) {
|
|
|
55695
55708
|
}
|
|
55696
55709
|
return null;
|
|
55697
55710
|
}
|
|
55698
|
-
var SEL_BG, SEL_FG, SEL_START, SEL_END, TextSelection, _hoveredButtonCmd, _pressedButtonCmd, BTN_REST_BG, BTN_REST_FG, BTN_HOVER_BG, BTN_HOVER_FG, BTN_PRESS_BG, BTN_PRESS_FG, _updateBadgeActive, _updateBadgeCol, _updateBadgeLen;
|
|
55711
|
+
var SEL_BG, SEL_FG, SEL_START, SEL_END, TextSelection, _clipboardAutoInstallAttempted, _hoveredButtonCmd, _pressedButtonCmd, BTN_REST_BG, BTN_REST_FG, BTN_HOVER_BG, BTN_HOVER_FG, BTN_PRESS_BG, BTN_PRESS_FG, _updateBadgeActive, _updateBadgeCol, _updateBadgeLen;
|
|
55699
55712
|
var init_text_selection = __esm({
|
|
55700
55713
|
"packages/cli/dist/tui/text-selection.js"() {
|
|
55701
55714
|
"use strict";
|
|
@@ -55898,6 +55911,7 @@ var init_text_selection = __esm({
|
|
|
55898
55911
|
return copyText(text);
|
|
55899
55912
|
}
|
|
55900
55913
|
};
|
|
55914
|
+
_clipboardAutoInstallAttempted = false;
|
|
55901
55915
|
_hoveredButtonCmd = null;
|
|
55902
55916
|
_pressedButtonCmd = null;
|
|
55903
55917
|
BTN_REST_BG = 236;
|
|
@@ -56823,7 +56837,11 @@ var init_status_bar = __esm({
|
|
|
56823
56837
|
this.repaintContent();
|
|
56824
56838
|
} else if (type === "release") {
|
|
56825
56839
|
this._textSelection.onMouseRelease(row, col);
|
|
56826
|
-
this.
|
|
56840
|
+
if (this._textSelection.hasSelection) {
|
|
56841
|
+
this.copySelection();
|
|
56842
|
+
} else {
|
|
56843
|
+
this.repaintContent();
|
|
56844
|
+
}
|
|
56827
56845
|
}
|
|
56828
56846
|
}
|
|
56829
56847
|
/** Copy current selection to clipboard. Returns true if copied. */
|
|
@@ -56831,18 +56849,20 @@ var init_status_bar = __esm({
|
|
|
56831
56849
|
if (!this._textSelection.hasSelection)
|
|
56832
56850
|
return false;
|
|
56833
56851
|
const ok = this._textSelection.copyToClipboard();
|
|
56852
|
+
this._textSelection.clear();
|
|
56853
|
+
this.repaintContent();
|
|
56854
|
+
const rows = process.stdout.rows ?? 24;
|
|
56855
|
+
const pos = this.rowPositions(rows);
|
|
56856
|
+
const writer = this._origWrite ?? process.stdout.write.bind(process.stdout);
|
|
56834
56857
|
if (ok) {
|
|
56835
|
-
this._textSelection.clear();
|
|
56836
|
-
this.repaintContent();
|
|
56837
|
-
const rows = process.stdout.rows ?? 24;
|
|
56838
|
-
const pos = this.rowPositions(rows);
|
|
56839
|
-
const writer = this._origWrite ?? process.stdout.write.bind(process.stdout);
|
|
56840
56858
|
writer(`\x1B[${pos.metricsRow};1H\x1B[2K\x1B[38;5;${TEXT_PRIMARY}m \u2713 Copied to clipboard\x1B[0m`);
|
|
56841
|
-
|
|
56842
|
-
|
|
56843
|
-
this.renderFooterAndPositionInput();
|
|
56844
|
-
}, 1200);
|
|
56859
|
+
} else {
|
|
56860
|
+
writer(`\x1B[${pos.metricsRow};1H\x1B[2K\x1B[38;5;214m \u26A0 Copy failed \u2014 install xclip: sudo apt install xclip\x1B[0m`);
|
|
56845
56861
|
}
|
|
56862
|
+
setTimeout(() => {
|
|
56863
|
+
if (this.active)
|
|
56864
|
+
this.renderFooterAndPositionInput();
|
|
56865
|
+
}, ok ? 1200 : 3e3);
|
|
56846
56866
|
return ok;
|
|
56847
56867
|
}
|
|
56848
56868
|
/** Arm block (rectangular) selection mode — next click starts block select */
|
package/package.json
CHANGED