open-agents-ai 0.187.214 → 0.187.216
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 +81 -21
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -280923,11 +280923,12 @@ function layout() {
|
|
|
280923
280923
|
const footerBoxBottom = footerMetrics - 1;
|
|
280924
280924
|
const footerBoxTop = rows - fh + 1;
|
|
280925
280925
|
const footerInput = footerBoxTop + 1;
|
|
280926
|
+
const FOOTER_SPACER_ROWS = 1;
|
|
280926
280927
|
let tasksBottom;
|
|
280927
280928
|
let tasksTop;
|
|
280928
280929
|
let contentBottom;
|
|
280929
280930
|
if (th > 0) {
|
|
280930
|
-
tasksBottom = footerBoxTop - 1;
|
|
280931
|
+
tasksBottom = footerBoxTop - 1 - FOOTER_SPACER_ROWS;
|
|
280931
280932
|
tasksTop = tasksBottom - th + 1;
|
|
280932
280933
|
contentBottom = tasksTop - 1 - CONTENT_SPACER_ROWS;
|
|
280933
280934
|
} else {
|
|
@@ -290649,15 +290650,15 @@ ${CONTENT_BG_SEQ}`);
|
|
|
290649
290650
|
this._contentLines.splice(-n2, n2);
|
|
290650
290651
|
if (this.active) this.refreshDisplay();
|
|
290651
290652
|
}
|
|
290652
|
-
/** Number of visible content rows
|
|
290653
|
+
/** Number of visible content rows. Derived directly from layout() so it
|
|
290654
|
+
* always matches the same source of truth used by the tasks renderer
|
|
290655
|
+
* and the spacer math. Previous version hard-coded SPACER_ROWS = 1,
|
|
290656
|
+
* which got out of sync when the FOOTER_SPACER_ROWS row was added
|
|
290657
|
+
* below the tasks panel — leaving content writes that overlapped the
|
|
290658
|
+
* tasks panel or the footer spacer. */
|
|
290653
290659
|
get contentHeight() {
|
|
290654
290660
|
const L = layout();
|
|
290655
|
-
|
|
290656
|
-
const SPACER_ROWS = 1;
|
|
290657
|
-
return Math.max(
|
|
290658
|
-
1,
|
|
290659
|
-
termRows() - (this.scrollRegionTop - 1) - this._currentFooterHeight - tasksRows - SPACER_ROWS
|
|
290660
|
-
);
|
|
290661
|
+
return Math.max(1, L.contentBottom - this.scrollRegionTop + 1);
|
|
290661
290662
|
}
|
|
290662
290663
|
/** Whether user has scrolled back from live */
|
|
290663
290664
|
get isScrolledBack() {
|
|
@@ -291272,8 +291273,10 @@ ${CONTENT_BG_SEQ}`);
|
|
|
291272
291273
|
let buf = "\x1B[?7l";
|
|
291273
291274
|
const boxInner = w - 2;
|
|
291274
291275
|
buf += `\x1B[${pos.inputStartRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_TL}${BOX_H.repeat(Math.max(0, boxInner))}${BOX_TR}${RESET2}`;
|
|
291276
|
+
const Lspacer = layout();
|
|
291275
291277
|
const spacerRow = pos.inputStartRow - 1;
|
|
291276
|
-
|
|
291278
|
+
const tasksOccupiesSpacer = Lspacer.tasksHeight > 0 && spacerRow >= Lspacer.tasksTop && spacerRow <= Lspacer.tasksBottom;
|
|
291279
|
+
if (spacerRow >= this.scrollRegionTop && !tasksOccupiesSpacer) {
|
|
291277
291280
|
buf += `\x1B[${spacerRow};1H${PANEL_BG_SEQ}\x1B[2K${RESET2}`;
|
|
291278
291281
|
}
|
|
291279
291282
|
for (let i2 = 0; i2 < inputWrap.lines.length; i2++) {
|
|
@@ -316893,17 +316896,16 @@ body {
|
|
|
316893
316896
|
|
|
316894
316897
|
/* WO-TASK-02 — task progress strip (shares processes-row styling) */
|
|
316895
316898
|
#tasks-row {
|
|
316896
|
-
display: none; /* hidden until tasks exist */
|
|
316899
|
+
display: none; /* hidden until tasks exist; flipped to flex when populated */
|
|
316900
|
+
flex-flow: row wrap; /* wrap items onto multiple lines for long lists */
|
|
316897
316901
|
align-items: center;
|
|
316898
|
-
gap: 6px;
|
|
316902
|
+
gap: 6px 6px; /* row gap + column gap once wrapping kicks in */
|
|
316899
316903
|
padding: 4px 16px;
|
|
316900
316904
|
min-height: 22px;
|
|
316901
316905
|
background: #17171a;
|
|
316902
316906
|
border-bottom: 1px solid #2a2a30;
|
|
316903
|
-
|
|
316904
|
-
scrollbar-width: none;
|
|
316907
|
+
/* Wrap instead of horizontal scroll so all tasks are visible */
|
|
316905
316908
|
}
|
|
316906
|
-
#tasks-row::-webkit-scrollbar { display: none; }
|
|
316907
316909
|
#tasks-row .tasks-label {
|
|
316908
316910
|
color: #444;
|
|
316909
316911
|
font-size: 0.55rem;
|
|
@@ -317704,17 +317706,75 @@ async function sendMessage() {
|
|
|
317704
317706
|
details.style.cssText = 'background:#1e1e22;border-left:2px solid #b2920a;margin:2px 0;font-size:0.7rem';
|
|
317705
317707
|
const summary = document.createElement('summary');
|
|
317706
317708
|
summary.style.cssText = 'padding:4px 8px;color:#b2920a;cursor:pointer';
|
|
317707
|
-
|
|
317709
|
+
|
|
317710
|
+
// Build a compact one-line label so the user sees what the tool
|
|
317711
|
+
// is actually doing without expanding. todo_write gets a special
|
|
317712
|
+
// status-counter summary; everything else gets a short args
|
|
317713
|
+
// preview that JSON-stringifies arrays/objects so they don't
|
|
317714
|
+
// render as "[object Object],[object Object],...".
|
|
317715
|
+
const toolName = chunk.tool || 'tool';
|
|
317716
|
+
const a = (chunk.args && typeof chunk.args === 'object') ? chunk.args : {};
|
|
317717
|
+
let inlineSummary = '';
|
|
317718
|
+
if (toolName === 'todo_write' && Array.isArray(a.todos)) {
|
|
317719
|
+
const todos = a.todos;
|
|
317720
|
+
let p = 0, ip = 0, c = 0, b = 0;
|
|
317721
|
+
for (const t of todos) {
|
|
317722
|
+
const s = (t && typeof t === 'object') ? t.status : '';
|
|
317723
|
+
if (s === 'completed') c++;
|
|
317724
|
+
else if (s === 'in_progress') ip++;
|
|
317725
|
+
else if (s === 'blocked') b++;
|
|
317726
|
+
else p++;
|
|
317727
|
+
}
|
|
317728
|
+
inlineSummary = ' — ' + todos.length + ' items (' + c + '◉ ' + ip + '◐ ' + p + '〇' + (b > 0 ? ' ' + b + '◍' : '') + ')';
|
|
317729
|
+
} else {
|
|
317730
|
+
const previewParts = [];
|
|
317731
|
+
for (const [k, v] of Object.entries(a)) {
|
|
317732
|
+
let vs;
|
|
317733
|
+
if (v === null || v === undefined) vs = String(v);
|
|
317734
|
+
else if (typeof v === 'string') vs = v;
|
|
317735
|
+
else if (typeof v === 'number' || typeof v === 'boolean') vs = String(v);
|
|
317736
|
+
else { try { vs = JSON.stringify(v); } catch { vs = '[object]'; } }
|
|
317737
|
+
if (vs.length > 60) vs = vs.slice(0, 57) + '…';
|
|
317738
|
+
previewParts.push(k + '=' + vs);
|
|
317739
|
+
if (previewParts.length >= 3) break;
|
|
317740
|
+
}
|
|
317741
|
+
if (previewParts.length) inlineSummary = ' — ' + previewParts.join(', ');
|
|
317742
|
+
}
|
|
317743
|
+
summary.textContent = '▸ ' + toolName + inlineSummary;
|
|
317708
317744
|
details.appendChild(summary);
|
|
317709
|
-
|
|
317745
|
+
|
|
317746
|
+
// Expandable args — unpack all key-value pairs. CRITICAL: stringify
|
|
317747
|
+
// arrays/objects so they don't show as "[object Object]". For
|
|
317748
|
+
// todo_write specifically render a checklist instead of a blob.
|
|
317710
317749
|
if (chunk.args && typeof chunk.args === 'object') {
|
|
317711
317750
|
const argsDiv = document.createElement('div');
|
|
317712
317751
|
argsDiv.style.cssText = 'padding:4px 8px 6px 16px;color:#888;font-size:0.65rem;border-top:1px solid #2a2a30';
|
|
317713
|
-
|
|
317714
|
-
const
|
|
317715
|
-
|
|
317716
|
-
|
|
317717
|
-
|
|
317752
|
+
if (toolName === 'todo_write' && Array.isArray(a.todos)) {
|
|
317753
|
+
for (const t of a.todos) {
|
|
317754
|
+
if (!t || typeof t !== 'object') continue;
|
|
317755
|
+
const row = document.createElement('div');
|
|
317756
|
+
row.style.cssText = 'padding:2px 0';
|
|
317757
|
+
let mark = '〇';
|
|
317758
|
+
let color = '#666';
|
|
317759
|
+
if (t.status === 'completed') { mark = '◉'; color = '#4a7a4a'; }
|
|
317760
|
+
else if (t.status === 'in_progress') { mark = '◐'; color = '#b2920a'; }
|
|
317761
|
+
else if (t.status === 'blocked') { mark = '◍'; color = '#b25f5f'; }
|
|
317762
|
+
row.innerHTML = '<span style="color:' + color + '">' + mark + '</span> <span style="color:#b0b0b0">' + escHtml(String(t.content || '').slice(0, 300)) + '</span>' + (t.blocker ? ' <span style="color:#b25f5f">(blocked: ' + escHtml(String(t.blocker).slice(0, 100)) + ')</span>' : '');
|
|
317763
|
+
argsDiv.appendChild(row);
|
|
317764
|
+
}
|
|
317765
|
+
} else {
|
|
317766
|
+
for (const [k, v] of Object.entries(chunk.args)) {
|
|
317767
|
+
const row = document.createElement('div');
|
|
317768
|
+
row.style.cssText = 'padding:2px 0;display:flex;gap:8px';
|
|
317769
|
+
let vs;
|
|
317770
|
+
if (v === null || v === undefined) vs = String(v);
|
|
317771
|
+
else if (typeof v === 'string') vs = v;
|
|
317772
|
+
else if (typeof v === 'number' || typeof v === 'boolean') vs = String(v);
|
|
317773
|
+
else { try { vs = JSON.stringify(v, null, 2); } catch { vs = '[object]'; } }
|
|
317774
|
+
if (vs.length > 500) vs = vs.slice(0, 497) + '…';
|
|
317775
|
+
row.innerHTML = '<span style="color:#b2920a;min-width:60px">' + k + '</span><span style="color:#b0b0b0;word-break:break-all;white-space:pre-wrap">' + escHtml(vs) + '</span>';
|
|
317776
|
+
argsDiv.appendChild(row);
|
|
317777
|
+
}
|
|
317718
317778
|
}
|
|
317719
317779
|
details.appendChild(argsDiv);
|
|
317720
317780
|
}
|
package/package.json
CHANGED