open-agents-ai 0.185.85 → 0.185.87
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 +11 -23
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65338,6 +65338,9 @@ body {
|
|
|
65338
65338
|
font-family: inherit;
|
|
65339
65339
|
font-size: 0.7rem;
|
|
65340
65340
|
margin-left: auto;
|
|
65341
|
+
max-width: 180px;
|
|
65342
|
+
overflow: hidden;
|
|
65343
|
+
text-overflow: ellipsis;
|
|
65341
65344
|
}
|
|
65342
65345
|
#header .key-btn {
|
|
65343
65346
|
background: #2a2a30;
|
|
@@ -68136,16 +68139,10 @@ Respond conversationally. Call task_complete with your final response.`;
|
|
|
68136
68139
|
continue;
|
|
68137
68140
|
try {
|
|
68138
68141
|
const evt = JSON.parse(line);
|
|
68139
|
-
if (evt.
|
|
68140
|
-
|
|
68141
|
-
|
|
68142
|
-
|
|
68143
|
-
content = evt.text;
|
|
68144
|
-
if (!content.trim()) {
|
|
68145
|
-
const summary = evt.summary || "";
|
|
68146
|
-
const match = summary.match(/Tokens:\s*[\d,]+\s+([\s\S]*)/);
|
|
68147
|
-
summaryContent = match ? match[1].trim() : summary;
|
|
68148
|
-
}
|
|
68142
|
+
if (evt.status === "completed" || evt.status === "failed") {
|
|
68143
|
+
const summary = evt.summary || "";
|
|
68144
|
+
const match = summary.match(/Tokens:\s*[\d,]+\s+([\s\S]*)/);
|
|
68145
|
+
content = match ? match[1].trim() : summary;
|
|
68149
68146
|
}
|
|
68150
68147
|
} catch {
|
|
68151
68148
|
}
|
|
@@ -73643,17 +73640,8 @@ async function runJson(task, config, repoPath) {
|
|
|
73643
73640
|
let assistantText = "";
|
|
73644
73641
|
let textBuffer = "";
|
|
73645
73642
|
process.stdout.write = ((chunk, ...args) => {
|
|
73646
|
-
if (typeof chunk === "string")
|
|
73643
|
+
if (typeof chunk === "string")
|
|
73647
73644
|
captured.push(chunk);
|
|
73648
|
-
const clean = chunk.replace(/\x1B\[[0-9;]*[A-Za-z]/g, "").replace(/\x1B\].*?\x07/g, "").replace(/\x1B[78]/g, "");
|
|
73649
|
-
if (clean.trim()) {
|
|
73650
|
-
const stripped = clean.replace(/[▸▹⎿]/g, "").trim();
|
|
73651
|
-
if (stripped.length > 0 && !stripped.startsWith("\x1B") && stripped.length < 5e3) {
|
|
73652
|
-
textBuffer += stripped + "\n";
|
|
73653
|
-
origWrite(JSON.stringify({ type: "text", content: stripped }) + "\n");
|
|
73654
|
-
}
|
|
73655
|
-
}
|
|
73656
|
-
}
|
|
73657
73645
|
return true;
|
|
73658
73646
|
});
|
|
73659
73647
|
process.stderr.write = (() => true);
|
|
@@ -73676,9 +73664,9 @@ async function runJson(task, config, repoPath) {
|
|
|
73676
73664
|
}
|
|
73677
73665
|
process.stdout.write = origWrite;
|
|
73678
73666
|
process.stderr.write = origStderr;
|
|
73679
|
-
|
|
73680
|
-
|
|
73681
|
-
|
|
73667
|
+
const allCaptured = captured.join("");
|
|
73668
|
+
const cleanText = allCaptured.replace(/\x1B\[[0-9;]*[A-Za-z]/g, "").replace(/\x1B\].*?\x07/g, "").replace(/\x1B[78]/g, "").replace(/\x1B\[\?[0-9;]*[hl]/g, "");
|
|
73669
|
+
result.text = cleanText;
|
|
73682
73670
|
process.stdout.write(JSON.stringify(result, null, 2) + "\n");
|
|
73683
73671
|
if (result.exitCode !== 0)
|
|
73684
73672
|
process.exit(1);
|
package/package.json
CHANGED