open-agents-ai 0.187.219 → 0.187.220
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 +45 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -281690,7 +281690,7 @@ function formatToolArgs(toolName, args, verbose) {
|
|
|
281690
281690
|
else if (t2?.status === "blocked") counts.b++;
|
|
281691
281691
|
else counts.p++;
|
|
281692
281692
|
}
|
|
281693
|
-
const summary = `${todos.length} items (${counts.c}◉ ${counts.i}◐ ${counts.p}
|
|
281693
|
+
const summary = `${todos.length} items (${counts.c}◉ ${counts.i}◐ ${counts.p}○${counts.b > 0 ? ` ${counts.b}◍` : ""})`;
|
|
281694
281694
|
if (verbose) {
|
|
281695
281695
|
const current = todos.find((t2) => t2?.status === "in_progress");
|
|
281696
281696
|
if (current?.content) {
|
|
@@ -288634,6 +288634,8 @@ function scheduleRedraw() {
|
|
|
288634
288634
|
function computeTargetHeight() {
|
|
288635
288635
|
if (!panelEffectivelyVisible()) return 0;
|
|
288636
288636
|
if (!_lastTodos || _lastTodos.length === 0) return 0;
|
|
288637
|
+
const allDone = _lastTodos.every((t2) => t2 && t2.status === "completed");
|
|
288638
|
+
if (allDone) return 0;
|
|
288637
288639
|
const itemRows = Math.min(_lastTodos.length, MAX_VISIBLE_ROWS - 1);
|
|
288638
288640
|
return 1 + itemRows;
|
|
288639
288641
|
}
|
|
@@ -288658,7 +288660,7 @@ function statusToAnsi(status) {
|
|
|
288658
288660
|
case "blocked":
|
|
288659
288661
|
return { mark: "◍", color: RED, box: RED };
|
|
288660
288662
|
default:
|
|
288661
|
-
return { mark: "
|
|
288663
|
+
return { mark: "○", color: GREY, box: GREY };
|
|
288662
288664
|
}
|
|
288663
288665
|
}
|
|
288664
288666
|
function truncate2(s2, max) {
|
|
@@ -317014,7 +317016,8 @@ body {
|
|
|
317014
317016
|
#footer {
|
|
317015
317017
|
display: flex;
|
|
317016
317018
|
flex-direction: column;
|
|
317017
|
-
gap: 4px
|
|
317019
|
+
/* gap: 0 — was 4px, removed per user request to tighten footer */
|
|
317020
|
+
gap: 0;
|
|
317018
317021
|
padding: 0;
|
|
317019
317022
|
background: #1e1e22;
|
|
317020
317023
|
border-top: 1px solid #2a2a30;
|
|
@@ -317866,7 +317869,22 @@ async function sendMessage() {
|
|
|
317866
317869
|
// preview that JSON-stringifies arrays/objects so they don't
|
|
317867
317870
|
// render as "[object Object],[object Object],...".
|
|
317868
317871
|
const toolName = chunk.tool || 'tool';
|
|
317869
|
-
|
|
317872
|
+
// Defensive: if chunk.args is a JSON string, parse it. Some
|
|
317873
|
+
// upstream paths serialize args twice and we end up with a
|
|
317874
|
+
// string body where the keys/values are inside.
|
|
317875
|
+
let a = (chunk.args && typeof chunk.args === 'object') ? chunk.args : {};
|
|
317876
|
+
if (typeof chunk.args === 'string') {
|
|
317877
|
+
try { a = JSON.parse(chunk.args); } catch { a = { _raw: chunk.args }; }
|
|
317878
|
+
}
|
|
317879
|
+
// Defensive: if a.todos is a JSON string instead of an array
|
|
317880
|
+
// (e.g., model serialized it instead of providing the object),
|
|
317881
|
+
// try to parse it back into an array so the checklist renders.
|
|
317882
|
+
if (toolName === 'todo_write' && typeof a.todos === 'string') {
|
|
317883
|
+
try {
|
|
317884
|
+
const parsed = JSON.parse(a.todos);
|
|
317885
|
+
if (Array.isArray(parsed)) a = Object.assign({}, a, { todos: parsed });
|
|
317886
|
+
} catch { /* leave as-is, fallback render kicks in */ }
|
|
317887
|
+
}
|
|
317870
317888
|
let inlineSummary = '';
|
|
317871
317889
|
if (toolName === 'todo_write' && Array.isArray(a.todos)) {
|
|
317872
317890
|
const todos = a.todos;
|
|
@@ -317878,7 +317896,7 @@ async function sendMessage() {
|
|
|
317878
317896
|
else if (s === 'blocked') b++;
|
|
317879
317897
|
else p++;
|
|
317880
317898
|
}
|
|
317881
|
-
inlineSummary = ' — ' + todos.length + ' items (' + c + '◉ ' + ip + '◐ ' + p + '
|
|
317899
|
+
inlineSummary = ' — ' + todos.length + ' items (' + c + '◉ ' + ip + '◐ ' + p + '○' + (b > 0 ? ' ' + b + '◍' : '') + ')';
|
|
317882
317900
|
} else {
|
|
317883
317901
|
const previewParts = [];
|
|
317884
317902
|
for (const [k, v] of Object.entries(a)) {
|
|
@@ -317907,7 +317925,7 @@ async function sendMessage() {
|
|
|
317907
317925
|
if (!t || typeof t !== 'object') continue;
|
|
317908
317926
|
const row = document.createElement('div');
|
|
317909
317927
|
row.style.cssText = 'padding:2px 0';
|
|
317910
|
-
let mark = '
|
|
317928
|
+
let mark = '○';
|
|
317911
317929
|
let color = '#666';
|
|
317912
317930
|
if (t.status === 'completed') { mark = '◉'; color = '#4a7a4a'; }
|
|
317913
317931
|
else if (t.status === 'in_progress') { mark = '◐'; color = '#b2920a'; }
|
|
@@ -319564,14 +319582,16 @@ const todoChecklistEl = document.getElementById('todo-checklist');
|
|
|
319564
319582
|
const todoListEl = document.getElementById('todo-list');
|
|
319565
319583
|
const tasksRowEl = document.getElementById('tasks-row');
|
|
319566
319584
|
|
|
319567
|
-
// Unicode circle markers —
|
|
319585
|
+
// Unicode circle markers — ○ empty, ◐ in_progress, ◉ completed, ◍ blocked
|
|
319568
319586
|
// Using literal unicode chars so the template-literal → HTML pipeline
|
|
319569
|
-
// doesn't mangle the escape sequences.
|
|
319587
|
+
// doesn't mangle the escape sequences. Switched from 〇 (U+3007) to
|
|
319588
|
+
// ○ (U+25CB) per user request — same visual but the ideographic 〇
|
|
319589
|
+
// rendered with a wider cell that pushed list items right.
|
|
319570
319590
|
function statusMark(status) {
|
|
319571
319591
|
return status === 'completed' ? '◉'
|
|
319572
319592
|
: status === 'in_progress' ? '◐'
|
|
319573
319593
|
: status === 'blocked' ? '◍'
|
|
319574
|
-
: '
|
|
319594
|
+
: '○';
|
|
319575
319595
|
}
|
|
319576
319596
|
|
|
319577
319597
|
function renderTasksRow(todos) {
|
|
@@ -319584,6 +319604,15 @@ function renderTasksRow(todos) {
|
|
|
319584
319604
|
tasksRowEl.style.display = 'none';
|
|
319585
319605
|
return;
|
|
319586
319606
|
}
|
|
319607
|
+
// When ALL tasks are completed the row collapses naturally — the user
|
|
319608
|
+
// doesn't need a stale "all done" strip eating layout space. Once any
|
|
319609
|
+
// task flips back to a non-completed state (or new tasks are added),
|
|
319610
|
+
// the row reappears on the next refreshTodos() call.
|
|
319611
|
+
const allDone = todos.every(t => t && t.status === 'completed');
|
|
319612
|
+
if (allDone) {
|
|
319613
|
+
tasksRowEl.style.display = 'none';
|
|
319614
|
+
return;
|
|
319615
|
+
}
|
|
319587
319616
|
tasksRowEl.style.display = 'flex';
|
|
319588
319617
|
// Pending count badge first so the user sees N/M progress
|
|
319589
319618
|
const completed = todos.filter(t => t.status === 'completed').length;
|
|
@@ -323467,7 +323496,12 @@ async function handleRequest(req2, res, ollamaUrl, verbose) {
|
|
|
323467
323496
|
return;
|
|
323468
323497
|
}
|
|
323469
323498
|
if (pathname === "/" && method === "GET" && req2.headers.accept?.includes("text/html")) {
|
|
323470
|
-
res.writeHead(200, {
|
|
323499
|
+
res.writeHead(200, {
|
|
323500
|
+
"Content-Type": "text/html; charset=utf-8",
|
|
323501
|
+
"Cache-Control": "no-cache, no-store, must-revalidate, max-age=0",
|
|
323502
|
+
"Pragma": "no-cache",
|
|
323503
|
+
"Expires": "0"
|
|
323504
|
+
});
|
|
323471
323505
|
res.end(getWebUI());
|
|
323472
323506
|
return;
|
|
323473
323507
|
}
|
|
@@ -323648,7 +323682,7 @@ async function handleRequest(req2, res, ollamaUrl, verbose) {
|
|
|
323648
323682
|
}
|
|
323649
323683
|
}
|
|
323650
323684
|
const todoBlock = currentTodos.length > 0 ? "CURRENT TODO LIST:\n" + currentTodos.map((t2) => {
|
|
323651
|
-
const mark = t2.status === "completed" ? "◉" : t2.status === "in_progress" ? "◐" : t2.status === "blocked" ? "◍" : "
|
|
323685
|
+
const mark = t2.status === "completed" ? "◉" : t2.status === "in_progress" ? "◐" : t2.status === "blocked" ? "◍" : "○";
|
|
323652
323686
|
return `${mark} ${t2.content}` + (t2.blocker ? ` (blocked: ${t2.blocker})` : "");
|
|
323653
323687
|
}).join("\n") + "\n\nUse the todo_write tool to update this list as you complete steps. Mark each item completed once you finish it.\n\n" : "";
|
|
323654
323688
|
const taskPrompt = todoBlock + memCtx.contextBlock + (historyLines ? `Previous conversation:
|
package/package.json
CHANGED