open-agents-ai 0.187.212 → 0.187.214
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 +113 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -288486,6 +288486,7 @@ __export(tui_tasks_renderer_exports, {
|
|
|
288486
288486
|
getTuiTasksScope: () => getTuiTasksScope,
|
|
288487
288487
|
onTuiTasksHeightChange: () => onTuiTasksHeightChange,
|
|
288488
288488
|
refreshTuiTasks: () => refreshTuiTasks,
|
|
288489
|
+
refreshTuiTasksSync: () => refreshTuiTasksSync,
|
|
288489
288490
|
setTuiTasksEnabled: () => setTuiTasksEnabled,
|
|
288490
288491
|
setTuiTasksScope: () => setTuiTasksScope,
|
|
288491
288492
|
setTuiTasksSession: () => setTuiTasksSession,
|
|
@@ -288495,7 +288496,7 @@ import { existsSync as existsSync57, readFileSync as readFileSync43, watch as fs
|
|
|
288495
288496
|
import { join as join74 } from "node:path";
|
|
288496
288497
|
import { homedir as homedir24 } from "node:os";
|
|
288497
288498
|
function panelEffectivelyVisible() {
|
|
288498
|
-
return _enabled && !_scopeOverlayActive && !_scopeNeovimActive && _scopeMainViewActive;
|
|
288499
|
+
return _enabled && !_scopeOverlayActive && !_scopeNeovimActive && !_scopePagerActive && _scopeMainViewActive;
|
|
288499
288500
|
}
|
|
288500
288501
|
function todoDir2() {
|
|
288501
288502
|
return join74(homedir24(), ".open-agents", "todos");
|
|
@@ -288544,8 +288545,13 @@ function setTuiTasksScope(scope) {
|
|
|
288544
288545
|
_scopeNeovimActive = scope.neovimActive;
|
|
288545
288546
|
changed = true;
|
|
288546
288547
|
}
|
|
288548
|
+
if (scope.pagerActive !== void 0 && scope.pagerActive !== _scopePagerActive) {
|
|
288549
|
+
_scopePagerActive = scope.pagerActive;
|
|
288550
|
+
changed = true;
|
|
288551
|
+
}
|
|
288547
288552
|
if (changed) {
|
|
288548
288553
|
if (!panelEffectivelyVisible()) {
|
|
288554
|
+
clearLastPaintedRows();
|
|
288549
288555
|
applyHeightChange(0);
|
|
288550
288556
|
} else {
|
|
288551
288557
|
scheduleRedraw();
|
|
@@ -288558,6 +288564,7 @@ function getTuiTasksScope() {
|
|
|
288558
288564
|
overlayActive: _scopeOverlayActive,
|
|
288559
288565
|
mainViewActive: _scopeMainViewActive,
|
|
288560
288566
|
neovimActive: _scopeNeovimActive,
|
|
288567
|
+
pagerActive: _scopePagerActive,
|
|
288561
288568
|
visible: panelEffectivelyVisible()
|
|
288562
288569
|
};
|
|
288563
288570
|
}
|
|
@@ -288566,6 +288573,13 @@ function refreshTuiTasks() {
|
|
|
288566
288573
|
loadTodos();
|
|
288567
288574
|
scheduleRedraw();
|
|
288568
288575
|
}
|
|
288576
|
+
function refreshTuiTasksSync() {
|
|
288577
|
+
if (!_activeSessionId) return;
|
|
288578
|
+
loadTodos();
|
|
288579
|
+
if (!_enabled) return;
|
|
288580
|
+
_redrawScheduled = false;
|
|
288581
|
+
render();
|
|
288582
|
+
}
|
|
288569
288583
|
function teardownTuiTasks() {
|
|
288570
288584
|
if (_watcher) {
|
|
288571
288585
|
try {
|
|
@@ -288653,12 +288667,16 @@ function truncate2(s2, max) {
|
|
|
288653
288667
|
function render() {
|
|
288654
288668
|
if (!_enabled) return;
|
|
288655
288669
|
if (!panelEffectivelyVisible()) {
|
|
288670
|
+
clearLastPaintedRows();
|
|
288656
288671
|
applyHeightChange(0);
|
|
288657
288672
|
return;
|
|
288658
288673
|
}
|
|
288659
288674
|
const target = computeTargetHeight();
|
|
288660
288675
|
applyHeightChange(target);
|
|
288661
|
-
if (target === 0)
|
|
288676
|
+
if (target === 0) {
|
|
288677
|
+
clearLastPaintedRows();
|
|
288678
|
+
return;
|
|
288679
|
+
}
|
|
288662
288680
|
const L = layout();
|
|
288663
288681
|
const cols = Math.max(20, termCols());
|
|
288664
288682
|
const completed = _lastTodos.filter((t2) => t2.status === "completed").length;
|
|
@@ -288680,6 +288698,17 @@ function render() {
|
|
|
288680
288698
|
lines[lines.length - 1] = `${DIM_LABEL}… +${more} more${RESET}`;
|
|
288681
288699
|
}
|
|
288682
288700
|
let out = HIDE + SAVE;
|
|
288701
|
+
const newTop = L.tasksTop;
|
|
288702
|
+
const newBottom = Math.min(L.tasksBottom, L.tasksTop + lines.length - 1);
|
|
288703
|
+
const safeClearTop = L.headerBottom + 1;
|
|
288704
|
+
const safeClearBottom = L.contentBottom;
|
|
288705
|
+
if (_lastPaintedTop >= 0 && _lastPaintedBottom >= _lastPaintedTop) {
|
|
288706
|
+
for (let row = _lastPaintedTop; row <= _lastPaintedBottom; row++) {
|
|
288707
|
+
if (row >= newTop && row <= newBottom) continue;
|
|
288708
|
+
if (row < safeClearTop || row > safeClearBottom) continue;
|
|
288709
|
+
out += `\x1B[${row};1H${CLEAR_LINE}`;
|
|
288710
|
+
}
|
|
288711
|
+
}
|
|
288683
288712
|
for (let i2 = 0; i2 < lines.length; i2++) {
|
|
288684
288713
|
const row = L.tasksTop + i2;
|
|
288685
288714
|
if (row > L.tasksBottom) break;
|
|
@@ -288690,8 +288719,28 @@ function render() {
|
|
|
288690
288719
|
process.stdout.write(out);
|
|
288691
288720
|
} catch {
|
|
288692
288721
|
}
|
|
288722
|
+
_lastPaintedTop = newTop;
|
|
288723
|
+
_lastPaintedBottom = newBottom;
|
|
288724
|
+
}
|
|
288725
|
+
function clearLastPaintedRows() {
|
|
288726
|
+
if (_lastPaintedTop < 0 || _lastPaintedBottom < _lastPaintedTop) return;
|
|
288727
|
+
const L = layout();
|
|
288728
|
+
const safeTop = L.headerBottom + 1;
|
|
288729
|
+
const safeBottom = Math.max(L.contentBottom, safeTop - 1);
|
|
288730
|
+
let out = HIDE + SAVE;
|
|
288731
|
+
for (let row = _lastPaintedTop; row <= _lastPaintedBottom; row++) {
|
|
288732
|
+
if (row < safeTop || row > safeBottom) continue;
|
|
288733
|
+
out += `\x1B[${row};1H${CLEAR_LINE}`;
|
|
288734
|
+
}
|
|
288735
|
+
out += RESTORE + SHOW;
|
|
288736
|
+
try {
|
|
288737
|
+
process.stdout.write(out);
|
|
288738
|
+
} catch {
|
|
288739
|
+
}
|
|
288740
|
+
_lastPaintedTop = -1;
|
|
288741
|
+
_lastPaintedBottom = -1;
|
|
288693
288742
|
}
|
|
288694
|
-
var _activeSessionId, _watcher, _lastTodos, _enabled, _redrawScheduled, _onResizeChange, _scopeOverlayActive, _scopeMainViewActive, _scopeNeovimActive, MAX_VISIBLE_ROWS, SAVE, RESTORE, HIDE, SHOW, CLEAR_LINE, RESET, BG, DIM_LABEL, GOLD, GREEN, MUTED_GREEN, GREY, RED;
|
|
288743
|
+
var _activeSessionId, _watcher, _lastTodos, _enabled, _redrawScheduled, _onResizeChange, _scopeOverlayActive, _scopeMainViewActive, _scopeNeovimActive, _scopePagerActive, _lastPaintedTop, _lastPaintedBottom, MAX_VISIBLE_ROWS, SAVE, RESTORE, HIDE, SHOW, CLEAR_LINE, RESET, BG, DIM_LABEL, GOLD, GREEN, MUTED_GREEN, GREY, RED;
|
|
288695
288744
|
var init_tui_tasks_renderer = __esm({
|
|
288696
288745
|
"packages/cli/src/tui/tui-tasks-renderer.ts"() {
|
|
288697
288746
|
"use strict";
|
|
@@ -288705,6 +288754,9 @@ var init_tui_tasks_renderer = __esm({
|
|
|
288705
288754
|
_scopeOverlayActive = false;
|
|
288706
288755
|
_scopeMainViewActive = true;
|
|
288707
288756
|
_scopeNeovimActive = false;
|
|
288757
|
+
_scopePagerActive = false;
|
|
288758
|
+
_lastPaintedTop = -1;
|
|
288759
|
+
_lastPaintedBottom = -1;
|
|
288708
288760
|
MAX_VISIBLE_ROWS = 8;
|
|
288709
288761
|
SAVE = "\x1B[s";
|
|
288710
288762
|
RESTORE = "\x1B[u";
|
|
@@ -288984,6 +289036,12 @@ var init_status_bar = __esm({
|
|
|
288984
289036
|
_prevTermCols = 0;
|
|
288985
289037
|
/** Debounce timer for resize events — prevents separator stacking during drag */
|
|
288986
289038
|
_resizeTimer = null;
|
|
289039
|
+
/** WO-TASK-02 — callback fired at the END of _handleResizeImmediate so
|
|
289040
|
+
* the tasks renderer can repaint AFTER the clear loop wipes the zone.
|
|
289041
|
+
* Without this, refreshTuiTasks() called from interactive.ts's resize
|
|
289042
|
+
* handler runs BEFORE the debounced _handleResizeImmediate and gets
|
|
289043
|
+
* clobbered. Wired in interactive.ts via setOnResizeFinalized(). */
|
|
289044
|
+
_onResizeFinalized = null;
|
|
288987
289045
|
/** True while resize is in-flight (between first SIGWINCH and debounce settle).
|
|
288988
289046
|
* Suppresses ALL footer renders to prevent separator debris at intermediate sizes. */
|
|
288989
289047
|
_resizing = false;
|
|
@@ -290390,13 +290448,29 @@ var init_status_bar = __esm({
|
|
|
290390
290448
|
this.renderFooterAndPositionInput();
|
|
290391
290449
|
if (this._bannerRefresh) this._bannerRefresh();
|
|
290392
290450
|
}
|
|
290451
|
+
if (this._onResizeFinalized) {
|
|
290452
|
+
try {
|
|
290453
|
+
this._onResizeFinalized();
|
|
290454
|
+
} catch {
|
|
290455
|
+
}
|
|
290456
|
+
}
|
|
290457
|
+
}
|
|
290458
|
+
/** Register a callback that fires AT THE END of _handleResizeImmediate.
|
|
290459
|
+
* Use this from interactive.ts to repaint the tasks panel after the
|
|
290460
|
+
* debounced clear/redraw cycle finishes. */
|
|
290461
|
+
setOnResizeFinalized(cb) {
|
|
290462
|
+
this._onResizeFinalized = cb;
|
|
290393
290463
|
}
|
|
290394
290464
|
/**
|
|
290395
290465
|
* Update the top boundary of the scroll region (e.g. after carousel retirement).
|
|
290396
290466
|
* When the scroll region starts at row 1, most terminals preserve scrollback.
|
|
290467
|
+
* DEFENSIVE: clamps to headerBottom + 1 so the scroll region never starts
|
|
290468
|
+
* inside the header zone (which would let content overwrite the version +
|
|
290469
|
+
* buttons row when fillContentArea / repaintContent run).
|
|
290397
290470
|
*/
|
|
290398
290471
|
setScrollRegionTop(top) {
|
|
290399
|
-
|
|
290472
|
+
const minTop = layout().headerBottom + 1;
|
|
290473
|
+
this.scrollRegionTop = Math.max(minTop, top);
|
|
290400
290474
|
if (this.active) {
|
|
290401
290475
|
this.applyScrollRegion();
|
|
290402
290476
|
this.renderFooterAndPositionInput();
|
|
@@ -290527,13 +290601,19 @@ ${CONTENT_BG_SEQ}`);
|
|
|
290527
290601
|
// Content scrollback — virtual scroll through buffered output lines
|
|
290528
290602
|
// -----------------------------------------------------------------------
|
|
290529
290603
|
/** Record a content line for scrollback. Called by the stream renderer intercept. */
|
|
290530
|
-
/** Paint the entire content area with CONTENT_BG — called on activation and resize
|
|
290604
|
+
/** Paint the entire content area with CONTENT_BG — called on activation and resize.
|
|
290605
|
+
* DEFENSIVE: never writes inside the header zone (rows 1..headerBottom),
|
|
290606
|
+
* even if scrollRegionTop is misconfigured. Without this guard, a stale
|
|
290607
|
+
* scrollRegionTop = 1 (set by retireCarousel when bannerActive is false)
|
|
290608
|
+
* would clear the header content row where the version + buttons live. */
|
|
290531
290609
|
fillContentArea() {
|
|
290532
290610
|
const h = this.contentHeight;
|
|
290611
|
+
const headerSafeFloor = layout().headerBottom + 1;
|
|
290533
290612
|
let buf = "\x1B7\x1B[?25l";
|
|
290534
290613
|
for (let r2 = 0; r2 < h; r2++) {
|
|
290535
290614
|
const screenRow = this.scrollRegionTop + r2;
|
|
290536
290615
|
if (screenRow > termRows()) break;
|
|
290616
|
+
if (screenRow < headerSafeFloor) continue;
|
|
290537
290617
|
buf += `\x1B[${screenRow};1H${CONTENT_BG_SEQ}\x1B[2K`;
|
|
290538
290618
|
}
|
|
290539
290619
|
buf += "\x1B8\x1B[?25h";
|
|
@@ -290592,6 +290672,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
290592
290672
|
this._autoScroll = false;
|
|
290593
290673
|
const maxOffset = Math.max(0, this._contentLines.length - this.contentHeight);
|
|
290594
290674
|
this._contentScrollOffset = Math.min(maxOffset, this._contentScrollOffset + lines);
|
|
290675
|
+
this._syncPagerScope();
|
|
290595
290676
|
this.repaintContent();
|
|
290596
290677
|
this.scheduleMouseIdle();
|
|
290597
290678
|
}
|
|
@@ -290602,8 +290683,9 @@ ${CONTENT_BG_SEQ}`);
|
|
|
290602
290683
|
this.cancelMouseIdle();
|
|
290603
290684
|
this.enableMouseTracking();
|
|
290604
290685
|
this._contentScrollOffset = Math.max(0, this._contentScrollOffset - lines);
|
|
290605
|
-
this.repaintContent();
|
|
290606
290686
|
if (this._contentScrollOffset === 0) this._autoScroll = true;
|
|
290687
|
+
this._syncPagerScope();
|
|
290688
|
+
this.repaintContent();
|
|
290607
290689
|
this.scheduleMouseIdle();
|
|
290608
290690
|
}
|
|
290609
290691
|
/** Page up — scroll by visible height */
|
|
@@ -290618,8 +290700,22 @@ ${CONTENT_BG_SEQ}`);
|
|
|
290618
290700
|
jumpToLive() {
|
|
290619
290701
|
this._contentScrollOffset = 0;
|
|
290620
290702
|
this._autoScroll = true;
|
|
290703
|
+
this._syncPagerScope();
|
|
290621
290704
|
this.repaintContent();
|
|
290622
290705
|
}
|
|
290706
|
+
/**
|
|
290707
|
+
* WO-TASK-02 — sync the tasks panel "pager" scope flag with the current
|
|
290708
|
+
* scroll-back state. While the user is scrolled back through content
|
|
290709
|
+
* history (PgUp/PgDn/wheel), the tasks panel must release its reserved
|
|
290710
|
+
* zone so the pager content owns the entire scrollable area and the
|
|
290711
|
+
* agent's todo_write updates don't trigger layout reflows that wipe
|
|
290712
|
+
* the page mid-read.
|
|
290713
|
+
*/
|
|
290714
|
+
_syncPagerScope() {
|
|
290715
|
+
const pagerOn = this._contentScrollOffset > 0;
|
|
290716
|
+
Promise.resolve().then(() => (init_tui_tasks_renderer(), tui_tasks_renderer_exports)).then((m2) => m2.setTuiTasksScope({ pagerActive: pagerOn })).catch(() => {
|
|
290717
|
+
});
|
|
290718
|
+
}
|
|
290623
290719
|
/**
|
|
290624
290720
|
* Repaint content area from buffer at current scroll position.
|
|
290625
290721
|
*
|
|
@@ -290634,6 +290730,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
290634
290730
|
const totalLines = this._contentLines.length;
|
|
290635
290731
|
const startIdx = Math.max(0, totalLines - h - this._contentScrollOffset);
|
|
290636
290732
|
const w = termCols();
|
|
290733
|
+
const headerSafeFloor = layout().headerBottom + 1;
|
|
290637
290734
|
let buf = "\x1B[?2026h";
|
|
290638
290735
|
buf += "\x1B7";
|
|
290639
290736
|
buf += "\x1B[?25l";
|
|
@@ -290641,6 +290738,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
290641
290738
|
const lineIdx = startIdx + row;
|
|
290642
290739
|
let line = lineIdx < totalLines ? this._contentLines[lineIdx] : "";
|
|
290643
290740
|
const screenRow = this.scrollRegionTop + row;
|
|
290741
|
+
if (screenRow < headerSafeFloor) continue;
|
|
290644
290742
|
line = line.replace(/\x1B\[0m/g, `\x1B[0m${CONTENT_BG_SEQ}`);
|
|
290645
290743
|
buf += `\x1B[${screenRow};1H${CONTENT_BG_SEQ}\x1B[2K${line}`;
|
|
290646
290744
|
}
|
|
@@ -326365,6 +326463,12 @@ async function startInteractive(config, repoPath) {
|
|
|
326365
326463
|
} catch {
|
|
326366
326464
|
}
|
|
326367
326465
|
});
|
|
326466
|
+
statusBar.setOnResizeFinalized(() => {
|
|
326467
|
+
try {
|
|
326468
|
+
refreshTuiTasksSync();
|
|
326469
|
+
} catch {
|
|
326470
|
+
}
|
|
326471
|
+
});
|
|
326368
326472
|
if (process.stdout.isTTY) {
|
|
326369
326473
|
const scrollTop = carouselLines > 0 ? carouselLines : 1;
|
|
326370
326474
|
statusBar.activate(scrollTop);
|
|
@@ -327137,10 +327241,6 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
327137
327241
|
process.stdout.on("resize", () => {
|
|
327138
327242
|
statusBar.handleResize();
|
|
327139
327243
|
setTermSize(process.stdout.rows ?? 24, process.stdout.columns ?? 80);
|
|
327140
|
-
try {
|
|
327141
|
-
refreshTuiTasks();
|
|
327142
|
-
} catch {
|
|
327143
|
-
}
|
|
327144
327244
|
if (isNeovimActive()) {
|
|
327145
327245
|
const contentRows = statusBar.isActive ? statusBar.availableContentRows : Math.max(5, termRows() - 6);
|
|
327146
327246
|
resizeNeovim(termCols(), contentRows);
|
|
@@ -328739,9 +328839,8 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
|
|
|
328739
328839
|
if (!carouselRetired && carousel.isRunning) {
|
|
328740
328840
|
carousel.stop();
|
|
328741
328841
|
carouselRetired = true;
|
|
328742
|
-
const bannerActive = banner.getDesign() !== null;
|
|
328743
328842
|
if (statusBar.isActive) {
|
|
328744
|
-
statusBar.setScrollRegionTop(
|
|
328843
|
+
statusBar.setScrollRegionTop(headerHeight() + 1);
|
|
328745
328844
|
}
|
|
328746
328845
|
}
|
|
328747
328846
|
},
|
|
@@ -329202,8 +329301,7 @@ Execute this skill now. Follow the behavioral guidance above.`;
|
|
|
329202
329301
|
if (!carouselRetired && carousel.isRunning) {
|
|
329203
329302
|
carousel.stop();
|
|
329204
329303
|
carouselRetired = true;
|
|
329205
|
-
|
|
329206
|
-
if (statusBar.isActive) statusBar.setScrollRegionTop(bannerActive ? 5 : 1);
|
|
329304
|
+
if (statusBar.isActive) statusBar.setScrollRegionTop(headerHeight() + 1);
|
|
329207
329305
|
}
|
|
329208
329306
|
writeContent(() => renderUserMessage(`/${cmdResult.name}${cmdResult.args ? " " + cmdResult.args : ""}`));
|
|
329209
329307
|
lastSubmittedPrompt = skillPrompt;
|
|
@@ -329476,8 +329574,7 @@ Summarize or analyze this transcription as appropriate.`;
|
|
|
329476
329574
|
if (!carouselRetired && carousel.isRunning) {
|
|
329477
329575
|
carousel.stop();
|
|
329478
329576
|
carouselRetired = true;
|
|
329479
|
-
|
|
329480
|
-
if (statusBar.isActive) statusBar.setScrollRegionTop(bannerActive ? 5 : 1);
|
|
329577
|
+
if (statusBar.isActive) statusBar.setScrollRegionTop(headerHeight() + 1);
|
|
329481
329578
|
}
|
|
329482
329579
|
const inputLineCount = fullInput.split("\n").length;
|
|
329483
329580
|
const displayText = isImage ? `[Image: ${cleanPath}]` : inputLineCount > 1 ? `[pasted ${inputLineCount} lines]` : fullInput;
|
package/package.json
CHANGED