open-agents-ai 0.104.11 → 0.104.12
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 +8 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34776,11 +34776,19 @@ function toggleFocus(state) {
|
|
|
34776
34776
|
const filtered = (...args) => {
|
|
34777
34777
|
if (args[0] instanceof Buffer) {
|
|
34778
34778
|
const raw = args[0].toString("utf8");
|
|
34779
|
+
if (raw === "") {
|
|
34780
|
+
toggleFocus(state);
|
|
34781
|
+
return;
|
|
34782
|
+
}
|
|
34779
34783
|
const clean = raw.replace(STDIN_MOUSE_FOCUS_RE, "");
|
|
34780
34784
|
if (!clean)
|
|
34781
34785
|
return;
|
|
34782
34786
|
fn(Buffer.from(clean));
|
|
34783
34787
|
} else if (typeof args[0] === "string") {
|
|
34788
|
+
if (args[0] === "") {
|
|
34789
|
+
toggleFocus(state);
|
|
34790
|
+
return;
|
|
34791
|
+
}
|
|
34784
34792
|
const clean = args[0].replace(STDIN_MOUSE_FOCUS_RE, "");
|
|
34785
34793
|
if (!clean)
|
|
34786
34794
|
return;
|
|
@@ -34815,14 +34823,6 @@ function toggleFocus(state) {
|
|
|
34815
34823
|
stdin.removeListener(event, fn);
|
|
34816
34824
|
}
|
|
34817
34825
|
state.installedFilteredListeners = [];
|
|
34818
|
-
state.savedRlListeners = [];
|
|
34819
|
-
for (const event of ["keypress", "data"]) {
|
|
34820
|
-
const listeners = stdin.listeners(event);
|
|
34821
|
-
for (const fn of listeners) {
|
|
34822
|
-
state.savedRlListeners.push({ event, fn });
|
|
34823
|
-
stdin.removeListener(event, fn);
|
|
34824
|
-
}
|
|
34825
|
-
}
|
|
34826
34826
|
if (typeof stdin.setRawMode === "function") {
|
|
34827
34827
|
stdin.setRawMode(true);
|
|
34828
34828
|
}
|
package/package.json
CHANGED