open-agents-ai 0.138.28 → 0.138.30
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 +34 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39768,15 +39768,10 @@ if __name__ == '__main__':
|
|
|
39768
39768
|
if (wavData.length > 44) {
|
|
39769
39769
|
const sampleRate = wavData.readUInt32LE(24);
|
|
39770
39770
|
const samples = new Int16Array(wavData.buffer, wavData.byteOffset + 44, (wavData.length - 44) / 2);
|
|
39771
|
-
const fadeInSamples = Math.min(Math.round(sampleRate * 0.
|
|
39771
|
+
const fadeInSamples = Math.min(Math.round(sampleRate * 0.35), samples.length);
|
|
39772
39772
|
for (let i = 0; i < fadeInSamples; i++) {
|
|
39773
39773
|
samples[i] = Math.round(samples[i] * (i / fadeInSamples));
|
|
39774
39774
|
}
|
|
39775
|
-
const fadeOutSamples = Math.min(Math.round(sampleRate * 0.05), samples.length);
|
|
39776
|
-
const fadeOutStart = samples.length - fadeOutSamples;
|
|
39777
|
-
for (let i = 0; i < fadeOutSamples; i++) {
|
|
39778
|
-
samples[fadeOutStart + i] = Math.round(samples[fadeOutStart + i] * (1 - i / fadeOutSamples));
|
|
39779
|
-
}
|
|
39780
39775
|
if (volume !== 1) {
|
|
39781
39776
|
for (let i = 0; i < samples.length; i++) {
|
|
39782
39777
|
samples[i] = Math.round(samples[i] * volume);
|
|
@@ -39834,7 +39829,7 @@ if __name__ == '__main__':
|
|
|
39834
39829
|
}
|
|
39835
39830
|
}
|
|
39836
39831
|
await this.playWav(wavPath);
|
|
39837
|
-
await this.sleep(
|
|
39832
|
+
await this.sleep(150);
|
|
39838
39833
|
try {
|
|
39839
39834
|
unlinkSync8(wavPath);
|
|
39840
39835
|
} catch {
|
|
@@ -50793,7 +50788,8 @@ var init_status_bar = __esm({
|
|
|
50793
50788
|
_processing = false;
|
|
50794
50789
|
_brailleSpinner = new BrailleSpinner();
|
|
50795
50790
|
/** Current dynamic footer height (min 5: buffer + topSep + 1 input line + bottomSep + metrics) */
|
|
50796
|
-
_currentFooterHeight =
|
|
50791
|
+
_currentFooterHeight = 3;
|
|
50792
|
+
// input(1) + braille(1) + metrics(1)
|
|
50797
50793
|
/** Timestamp when streaming started (for token rate calculation) */
|
|
50798
50794
|
_streamStartTime = 0;
|
|
50799
50795
|
/** Current package version (shown in metrics row, rightmost) */
|
|
@@ -52216,12 +52212,41 @@ ${CONTENT_BG_SEQ}`);
|
|
|
52216
52212
|
let arrowBurst = 0;
|
|
52217
52213
|
let arrowBurstDir = "";
|
|
52218
52214
|
let arrowBurstTimer = null;
|
|
52215
|
+
let sawEscape = false;
|
|
52216
|
+
let sawEscapeTime = 0;
|
|
52219
52217
|
rl._ttyWrite = function(s, key) {
|
|
52220
52218
|
if (!self.active)
|
|
52221
52219
|
return origTtyWrite(s, key);
|
|
52222
52220
|
if (s && (/\x1B\[</.test(s) || /^\d+;\d+;\d*[Mm]/.test(s) || /^;\d+[Mm]/.test(s) || /\[<\d/.test(s))) {
|
|
52223
52221
|
return;
|
|
52224
52222
|
}
|
|
52223
|
+
if (key?.name === "escape" || s === "\x1B") {
|
|
52224
|
+
sawEscape = true;
|
|
52225
|
+
sawEscapeTime = Date.now();
|
|
52226
|
+
if (self.writeDepth > 0)
|
|
52227
|
+
return;
|
|
52228
|
+
return origTtyWrite(s, key);
|
|
52229
|
+
}
|
|
52230
|
+
if (sawEscape && Date.now() - sawEscapeTime < 100) {
|
|
52231
|
+
sawEscape = false;
|
|
52232
|
+
if (s === "[A" || s === "[B") {
|
|
52233
|
+
if (s === "[A")
|
|
52234
|
+
self.scrollContentUp(1);
|
|
52235
|
+
else
|
|
52236
|
+
self.scrollContentDown(1);
|
|
52237
|
+
return;
|
|
52238
|
+
}
|
|
52239
|
+
if (s === "[5~" || s === "[6~") {
|
|
52240
|
+
if (s === "[5~")
|
|
52241
|
+
self.pageUpContent();
|
|
52242
|
+
else
|
|
52243
|
+
self.pageDownContent();
|
|
52244
|
+
return;
|
|
52245
|
+
}
|
|
52246
|
+
if (s.startsWith("["))
|
|
52247
|
+
return;
|
|
52248
|
+
}
|
|
52249
|
+
sawEscape = false;
|
|
52225
52250
|
if (key?.name === "up" || key?.name === "down") {
|
|
52226
52251
|
const dir = key.name;
|
|
52227
52252
|
if (dir === arrowBurstDir) {
|
|
@@ -54046,6 +54071,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
54046
54071
|
const prompt = activeTask ? activeTask.runner.isPaused ? pausedPrompt : activePrompt : idlePrompt;
|
|
54047
54072
|
rl.setPrompt(prompt);
|
|
54048
54073
|
if (statusBar.isActive) {
|
|
54074
|
+
statusBar.positionAtInput();
|
|
54049
54075
|
statusBar.setPromptText(prompt, 2);
|
|
54050
54076
|
} else {
|
|
54051
54077
|
rl.prompt();
|
package/package.json
CHANGED