open-agents-ai 0.187.77 → 0.187.78
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 +152 -136
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -270921,6 +270921,73 @@ var init_theme = __esm({
|
|
|
270921
270921
|
}
|
|
270922
270922
|
});
|
|
270923
270923
|
|
|
270924
|
+
// packages/cli/dist/tui/layout.js
|
|
270925
|
+
function layout() {
|
|
270926
|
+
const rows = _termRows;
|
|
270927
|
+
const cols = _termCols;
|
|
270928
|
+
const fh = _footerHeight;
|
|
270929
|
+
const hh = _headerHeight;
|
|
270930
|
+
const headerTop = 1;
|
|
270931
|
+
const headerContent = 2;
|
|
270932
|
+
const headerBottom = hh;
|
|
270933
|
+
const contentTop = headerBottom + 1;
|
|
270934
|
+
const footerMetrics = rows;
|
|
270935
|
+
const footerBoxBottom = footerMetrics - 1;
|
|
270936
|
+
const footerBoxTop = rows - fh + 1;
|
|
270937
|
+
const footerInput = footerBoxTop + 1;
|
|
270938
|
+
const contentBottom = footerBoxTop - 1;
|
|
270939
|
+
const contentHeight = Math.max(1, contentBottom - contentTop + 1);
|
|
270940
|
+
return {
|
|
270941
|
+
rows,
|
|
270942
|
+
cols,
|
|
270943
|
+
headerTop,
|
|
270944
|
+
headerContent,
|
|
270945
|
+
headerBottom,
|
|
270946
|
+
contentTop,
|
|
270947
|
+
contentBottom,
|
|
270948
|
+
contentHeight,
|
|
270949
|
+
footerBoxTop,
|
|
270950
|
+
footerInput,
|
|
270951
|
+
footerBoxBottom,
|
|
270952
|
+
footerMetrics,
|
|
270953
|
+
scrollRegionTop: contentTop,
|
|
270954
|
+
scrollRegionBottom: contentBottom,
|
|
270955
|
+
footerHeight: fh,
|
|
270956
|
+
headerHeight: _headerHeight
|
|
270957
|
+
};
|
|
270958
|
+
}
|
|
270959
|
+
function setTermSize(rows, cols) {
|
|
270960
|
+
_termRows = rows;
|
|
270961
|
+
_termCols = cols;
|
|
270962
|
+
}
|
|
270963
|
+
function setFooterHeight(height) {
|
|
270964
|
+
_footerHeight = Math.max(FOOTER_MIN_ROWS, height);
|
|
270965
|
+
}
|
|
270966
|
+
function setHeaderHeight(height) {
|
|
270967
|
+
_headerHeight = Math.max(1, height);
|
|
270968
|
+
}
|
|
270969
|
+
function headerHeight() {
|
|
270970
|
+
return _headerHeight;
|
|
270971
|
+
}
|
|
270972
|
+
function termRows() {
|
|
270973
|
+
return _termRows;
|
|
270974
|
+
}
|
|
270975
|
+
function termCols() {
|
|
270976
|
+
return _termCols;
|
|
270977
|
+
}
|
|
270978
|
+
var HEADER_ROWS, FOOTER_MIN_ROWS, _termRows, _termCols, _footerHeight, _headerHeight;
|
|
270979
|
+
var init_layout2 = __esm({
|
|
270980
|
+
"packages/cli/dist/tui/layout.js"() {
|
|
270981
|
+
"use strict";
|
|
270982
|
+
HEADER_ROWS = 3;
|
|
270983
|
+
FOOTER_MIN_ROWS = 4;
|
|
270984
|
+
_termRows = 24;
|
|
270985
|
+
_termCols = 80;
|
|
270986
|
+
_footerHeight = FOOTER_MIN_ROWS;
|
|
270987
|
+
_headerHeight = HEADER_ROWS;
|
|
270988
|
+
}
|
|
270989
|
+
});
|
|
270990
|
+
|
|
270924
270991
|
// packages/cli/dist/tui/render.js
|
|
270925
270992
|
function accentFg() {
|
|
270926
270993
|
const a2 = tuiAccent();
|
|
@@ -270972,7 +271039,7 @@ function getColorsEnabled() {
|
|
|
270972
271039
|
return _colorsEnabled;
|
|
270973
271040
|
}
|
|
270974
271041
|
function getTermWidth() {
|
|
270975
|
-
return
|
|
271042
|
+
return termCols();
|
|
270976
271043
|
}
|
|
270977
271044
|
function formatMarkdownLine(line) {
|
|
270978
271045
|
const headingMatch = line.match(/^(#{1,6})\s+(.*)/);
|
|
@@ -271490,6 +271557,7 @@ var init_render = __esm({
|
|
|
271490
271557
|
"packages/cli/dist/tui/render.js"() {
|
|
271491
271558
|
"use strict";
|
|
271492
271559
|
init_theme();
|
|
271560
|
+
init_layout2();
|
|
271493
271561
|
isTTY2 = process.stdout.isTTY ?? false;
|
|
271494
271562
|
c3 = {
|
|
271495
271563
|
bold: (t2) => ansi2("1", t2),
|
|
@@ -278086,60 +278154,6 @@ var init_daemon_registry = __esm({
|
|
|
278086
278154
|
}
|
|
278087
278155
|
});
|
|
278088
278156
|
|
|
278089
|
-
// packages/cli/dist/tui/layout.js
|
|
278090
|
-
function layout() {
|
|
278091
|
-
const rows = _termRows;
|
|
278092
|
-
const cols = _termCols;
|
|
278093
|
-
const fh = _footerHeight;
|
|
278094
|
-
const headerTop = 1;
|
|
278095
|
-
const headerContent = 2;
|
|
278096
|
-
const headerBottom = 3;
|
|
278097
|
-
const contentTop = headerBottom + 1;
|
|
278098
|
-
const footerMetrics = rows;
|
|
278099
|
-
const footerBoxBottom = footerMetrics - 1;
|
|
278100
|
-
const footerBoxTop = rows - fh + 1;
|
|
278101
|
-
const footerInput = footerBoxTop + 1;
|
|
278102
|
-
const contentBottom = footerBoxTop - 1;
|
|
278103
|
-
const contentHeight = Math.max(1, contentBottom - contentTop + 1);
|
|
278104
|
-
return {
|
|
278105
|
-
rows,
|
|
278106
|
-
cols,
|
|
278107
|
-
headerTop,
|
|
278108
|
-
headerContent,
|
|
278109
|
-
headerBottom,
|
|
278110
|
-
contentTop,
|
|
278111
|
-
contentBottom,
|
|
278112
|
-
contentHeight,
|
|
278113
|
-
footerBoxTop,
|
|
278114
|
-
footerInput,
|
|
278115
|
-
footerBoxBottom,
|
|
278116
|
-
footerMetrics,
|
|
278117
|
-
scrollRegionTop: contentTop,
|
|
278118
|
-
scrollRegionBottom: contentBottom,
|
|
278119
|
-
footerHeight: fh,
|
|
278120
|
-
headerHeight: _headerHeight
|
|
278121
|
-
};
|
|
278122
|
-
}
|
|
278123
|
-
function setTermSize(rows, cols) {
|
|
278124
|
-
_termRows = rows;
|
|
278125
|
-
_termCols = cols;
|
|
278126
|
-
}
|
|
278127
|
-
function setFooterHeight(height) {
|
|
278128
|
-
_footerHeight = Math.max(FOOTER_MIN_ROWS, height);
|
|
278129
|
-
}
|
|
278130
|
-
var HEADER_ROWS, FOOTER_MIN_ROWS, _termRows, _termCols, _footerHeight, _headerHeight;
|
|
278131
|
-
var init_layout2 = __esm({
|
|
278132
|
-
"packages/cli/dist/tui/layout.js"() {
|
|
278133
|
-
"use strict";
|
|
278134
|
-
HEADER_ROWS = 3;
|
|
278135
|
-
FOOTER_MIN_ROWS = 4;
|
|
278136
|
-
_termRows = 24;
|
|
278137
|
-
_termCols = 80;
|
|
278138
|
-
_footerHeight = FOOTER_MIN_ROWS;
|
|
278139
|
-
_headerHeight = HEADER_ROWS;
|
|
278140
|
-
}
|
|
278141
|
-
});
|
|
278142
|
-
|
|
278143
278157
|
// packages/cli/dist/tui/status-bar.js
|
|
278144
278158
|
var status_bar_exports = {};
|
|
278145
278159
|
__export(status_bar_exports, {
|
|
@@ -278513,7 +278527,7 @@ var init_status_bar = __esm({
|
|
|
278513
278527
|
refreshHeaderContent() {
|
|
278514
278528
|
if (!this.active)
|
|
278515
278529
|
return;
|
|
278516
|
-
const w =
|
|
278530
|
+
const w = termCols();
|
|
278517
278531
|
const innerW = w - 2;
|
|
278518
278532
|
const panel = this._headerPanels[this._headerPanelIndex];
|
|
278519
278533
|
if (!panel)
|
|
@@ -278522,14 +278536,15 @@ var init_status_bar = __esm({
|
|
|
278522
278536
|
const hasMultiple = this._headerPanels.length > 1;
|
|
278523
278537
|
const leftArrow = hasMultiple ? `\x1B]8;;oa-cmd:header-prev\x07\x1B[38;5;${TEXT_DIM}m${this._headerPanelIndex > 0 ? "\u25C0" : " "}\x1B]8;;\x07` : " ";
|
|
278524
278538
|
const rightArrow = hasMultiple ? `\x1B]8;;oa-cmd:header-next\x07\x1B[38;5;${TEXT_DIM}m${this._headerPanelIndex < this._headerPanels.length - 1 ? "\u25B6" : " "}\x1B]8;;\x07` : " ";
|
|
278539
|
+
const hdrRow = layout().headerContent;
|
|
278525
278540
|
let buf = "\x1B7";
|
|
278526
|
-
buf += `\x1B[
|
|
278541
|
+
buf += `\x1B[${hdrRow};1H${PANEL_BG_SEQ}\x1B[2K`;
|
|
278527
278542
|
buf += `${BOX_FG}\u2502${RESET}${PANEL_BG_SEQ}`;
|
|
278528
278543
|
buf += leftArrow;
|
|
278529
278544
|
buf += ` `;
|
|
278530
278545
|
buf += `\x1B[38;5;${TEXT_PRIMARY}m${PANEL_BG_SEQ}`;
|
|
278531
278546
|
buf += content;
|
|
278532
|
-
buf += `\x1B[
|
|
278547
|
+
buf += `\x1B[${hdrRow};${w - 2}H`;
|
|
278533
278548
|
buf += rightArrow;
|
|
278534
278549
|
buf += ` ${BOX_FG}\u2502${RESET}`;
|
|
278535
278550
|
buf += "\x1B8";
|
|
@@ -279101,8 +279116,8 @@ var init_status_bar = __esm({
|
|
|
279101
279116
|
startedAt: Date.now()
|
|
279102
279117
|
});
|
|
279103
279118
|
}
|
|
279104
|
-
this._prevTermRows =
|
|
279105
|
-
this._prevTermCols =
|
|
279119
|
+
this._prevTermRows = termRows();
|
|
279120
|
+
this._prevTermCols = termCols();
|
|
279106
279121
|
this.applyScrollRegion(true);
|
|
279107
279122
|
this.fillContentArea();
|
|
279108
279123
|
this.renderFooterAndPositionInput();
|
|
@@ -279125,8 +279140,7 @@ var init_status_bar = __esm({
|
|
|
279125
279140
|
this._processing = false;
|
|
279126
279141
|
}
|
|
279127
279142
|
this.stopAllMetrics();
|
|
279128
|
-
|
|
279129
|
-
this.termWrite(`\x1B[1;${rows}r`);
|
|
279143
|
+
this.termWrite(`\x1B[1;${termRows()}r`);
|
|
279130
279144
|
}
|
|
279131
279145
|
/** Whether the status bar is currently active */
|
|
279132
279146
|
get isActive() {
|
|
@@ -279237,8 +279251,7 @@ var init_status_bar = __esm({
|
|
|
279237
279251
|
}
|
|
279238
279252
|
/** Handle mouse click on a suggestion row */
|
|
279239
279253
|
suggestClickAt(row) {
|
|
279240
|
-
const
|
|
279241
|
-
const pos = this.rowPositions(rows);
|
|
279254
|
+
const pos = this.rowPositions(termRows());
|
|
279242
279255
|
if (pos.suggestStartRow <= 0 || this._suggestions.length === 0)
|
|
279243
279256
|
return false;
|
|
279244
279257
|
const idx = row - pos.suggestStartRow;
|
|
@@ -279394,7 +279407,7 @@ var init_status_bar = __esm({
|
|
|
279394
279407
|
handlePointerEvent(type, col, row) {
|
|
279395
279408
|
if (!this.active)
|
|
279396
279409
|
return;
|
|
279397
|
-
const w =
|
|
279410
|
+
const w = termCols();
|
|
279398
279411
|
if (type === "press" && this._suggestions.length > 0) {
|
|
279399
279412
|
if (this.suggestClickAt(row))
|
|
279400
279413
|
return;
|
|
@@ -279429,8 +279442,7 @@ var init_status_bar = __esm({
|
|
|
279429
279442
|
}
|
|
279430
279443
|
return;
|
|
279431
279444
|
}
|
|
279432
|
-
const
|
|
279433
|
-
const pos = this.rowPositions(rows);
|
|
279445
|
+
const pos = this.rowPositions(termRows());
|
|
279434
279446
|
if (type === "press" && pos.tabBarRow > 0 && row === pos.tabBarRow) {
|
|
279435
279447
|
const viewId = this.hitTestTabBar(col);
|
|
279436
279448
|
if (viewId)
|
|
@@ -279438,7 +279450,7 @@ var init_status_bar = __esm({
|
|
|
279438
279450
|
return;
|
|
279439
279451
|
}
|
|
279440
279452
|
const fh = this._currentFooterHeight;
|
|
279441
|
-
const footerStart =
|
|
279453
|
+
const footerStart = termRows() - fh + 1;
|
|
279442
279454
|
if (row >= footerStart)
|
|
279443
279455
|
return;
|
|
279444
279456
|
}
|
|
@@ -279449,8 +279461,7 @@ var init_status_bar = __esm({
|
|
|
279449
279461
|
const ok = this._textSelection.copyToClipboard();
|
|
279450
279462
|
this._textSelection.clear();
|
|
279451
279463
|
this.repaintContent();
|
|
279452
|
-
const
|
|
279453
|
-
const pos = this.rowPositions(rows);
|
|
279464
|
+
const pos = this.rowPositions(termRows());
|
|
279454
279465
|
const writer = this._origWrite ?? process.stdout.write.bind(process.stdout);
|
|
279455
279466
|
if (ok) {
|
|
279456
279467
|
writer(`\x1B[${pos.metricsRow};1H\x1B[2K\x1B[38;5;${TEXT_PRIMARY}m \u2713 Copied to clipboard\x1B[0m`);
|
|
@@ -279466,8 +279477,7 @@ var init_status_bar = __esm({
|
|
|
279466
279477
|
/** Arm block (rectangular) selection mode — next click starts block select */
|
|
279467
279478
|
armBlockSelection() {
|
|
279468
279479
|
this._textSelection.armBlockMode();
|
|
279469
|
-
const
|
|
279470
|
-
const pos = this.rowPositions(rows);
|
|
279480
|
+
const pos = this.rowPositions(termRows());
|
|
279471
279481
|
const writer = this._origWrite ?? process.stdout.write.bind(process.stdout);
|
|
279472
279482
|
writer(`\x1B[${pos.metricsRow};1H\x1B[2K\x1B[38;5;${TEXT_PRIMARY}m \u25A0 Block selection mode \u2014 click and drag\x1B[0m`);
|
|
279473
279483
|
setTimeout(() => {
|
|
@@ -279629,7 +279639,7 @@ var init_status_bar = __esm({
|
|
|
279629
279639
|
* overlay UIs (tuiSelect, /expose dashboard, etc.) should use.
|
|
279630
279640
|
*/
|
|
279631
279641
|
get availableContentRows() {
|
|
279632
|
-
const rows =
|
|
279642
|
+
const rows = termRows();
|
|
279633
279643
|
const usable = rows - (this.scrollRegionTop - 1) - this._currentFooterHeight;
|
|
279634
279644
|
return Math.max(3, usable);
|
|
279635
279645
|
}
|
|
@@ -279653,8 +279663,8 @@ var init_status_bar = __esm({
|
|
|
279653
279663
|
const prevRows = this._prevTermRows;
|
|
279654
279664
|
const prevCols = this._prevTermCols;
|
|
279655
279665
|
this.updateFooterHeight();
|
|
279656
|
-
const rows =
|
|
279657
|
-
const cols =
|
|
279666
|
+
const rows = termRows();
|
|
279667
|
+
const cols = termCols();
|
|
279658
279668
|
this._prevTermRows = rows;
|
|
279659
279669
|
this._prevTermCols = cols;
|
|
279660
279670
|
const pos = this.rowPositions(rows);
|
|
@@ -279782,12 +279792,11 @@ ${CONTENT_BG_SEQ}`);
|
|
|
279782
279792
|
/** Record a content line for scrollback. Called by the stream renderer intercept. */
|
|
279783
279793
|
/** Paint the entire content area with CONTENT_BG — called on activation and resize */
|
|
279784
279794
|
fillContentArea() {
|
|
279785
|
-
const rows = process.stdout.rows ?? 24;
|
|
279786
279795
|
const h = this.contentHeight;
|
|
279787
279796
|
let buf = "\x1B7\x1B[?25l";
|
|
279788
279797
|
for (let r2 = 0; r2 < h; r2++) {
|
|
279789
279798
|
const screenRow = this.scrollRegionTop + r2;
|
|
279790
|
-
if (screenRow >
|
|
279799
|
+
if (screenRow > termRows())
|
|
279791
279800
|
break;
|
|
279792
279801
|
buf += `\x1B[${screenRow};1H${CONTENT_BG_SEQ}\x1B[2K`;
|
|
279793
279802
|
}
|
|
@@ -279825,8 +279834,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
279825
279834
|
}
|
|
279826
279835
|
/** Number of visible content rows */
|
|
279827
279836
|
get contentHeight() {
|
|
279828
|
-
|
|
279829
|
-
return Math.max(1, rows - (this.scrollRegionTop - 1) - this._currentFooterHeight);
|
|
279837
|
+
return Math.max(1, termRows() - (this.scrollRegionTop - 1) - this._currentFooterHeight);
|
|
279830
279838
|
}
|
|
279831
279839
|
/** Whether user has scrolled back from live */
|
|
279832
279840
|
get isScrolledBack() {
|
|
@@ -279881,7 +279889,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
279881
279889
|
const h = this.contentHeight;
|
|
279882
279890
|
const totalLines = this._contentLines.length;
|
|
279883
279891
|
const startIdx = Math.max(0, totalLines - h - this._contentScrollOffset);
|
|
279884
|
-
const w =
|
|
279892
|
+
const w = termCols();
|
|
279885
279893
|
let buf = "\x1B[?2026h";
|
|
279886
279894
|
buf += "\x1B7";
|
|
279887
279895
|
buf += "\x1B[?25l";
|
|
@@ -280370,8 +280378,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
280370
280378
|
/** Set the DECSTBM scroll region to exclude the dynamic footer rows */
|
|
280371
280379
|
applyScrollRegion(clearScrollback = false) {
|
|
280372
280380
|
this.updateFooterHeight();
|
|
280373
|
-
const
|
|
280374
|
-
const pos = this.rowPositions(rows);
|
|
280381
|
+
const pos = this.rowPositions(termRows());
|
|
280375
280382
|
this.termWrite(`\x1B[${this.scrollRegionTop};${pos.scrollEnd}r\x1B[${pos.scrollEnd};1H` + (clearScrollback ? "\x1B[3J" : ""));
|
|
280376
280383
|
}
|
|
280377
280384
|
/**
|
|
@@ -280386,7 +280393,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
280386
280393
|
renderFooterAndPositionInput() {
|
|
280387
280394
|
if (!this.active || this._resizing)
|
|
280388
280395
|
return;
|
|
280389
|
-
const rows =
|
|
280396
|
+
const rows = termRows();
|
|
280390
280397
|
const w = getTermWidth();
|
|
280391
280398
|
const oldFooterHeight = this._currentFooterHeight;
|
|
280392
280399
|
const heightChanged = this.updateFooterHeight(w);
|
|
@@ -280475,9 +280482,8 @@ ${CONTENT_BG_SEQ}`);
|
|
|
280475
280482
|
}
|
|
280476
280483
|
return;
|
|
280477
280484
|
}
|
|
280478
|
-
const rows = process.stdout.rows ?? 24;
|
|
280479
280485
|
const w = getTermWidth();
|
|
280480
|
-
const pos = this.rowPositions(
|
|
280486
|
+
const pos = this.rowPositions(termRows());
|
|
280481
280487
|
let buf = "\x1B7\x1B[?7l";
|
|
280482
280488
|
if (pos.tabBarRow > 0) {
|
|
280483
280489
|
buf += `\x1B[${pos.tabBarRow};1H${PANEL_BG_SEQ}\x1B[2K${RESET}`;
|
|
@@ -280511,7 +280517,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
280511
280517
|
renderInputRowDuringStream() {
|
|
280512
280518
|
if (!this.active || this._resizing || !this.inputStateProvider)
|
|
280513
280519
|
return;
|
|
280514
|
-
const rows =
|
|
280520
|
+
const rows = termRows();
|
|
280515
280521
|
const w = getTermWidth();
|
|
280516
280522
|
const oldFooterHeight = this._currentFooterHeight;
|
|
280517
280523
|
const heightChanged = this.updateFooterHeight(w);
|
|
@@ -280738,8 +280744,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
280738
280744
|
const nextLines = Math.ceil((line.length + 1) / avail);
|
|
280739
280745
|
if (nextLines > currentLines) {
|
|
280740
280746
|
self2.updateFooterHeight();
|
|
280741
|
-
const
|
|
280742
|
-
const pos = self2.rowPositions(rows);
|
|
280747
|
+
const pos = self2.rowPositions(termRows());
|
|
280743
280748
|
const writer = self2._origWrite ?? process.stdout.write.bind(process.stdout);
|
|
280744
280749
|
writer(`\x1B[${self2.scrollRegionTop};${pos.scrollEnd}r`);
|
|
280745
280750
|
self2.renderFooterAndPositionInput();
|
|
@@ -284662,9 +284667,9 @@ async function startNeovimMode(opts) {
|
|
|
284662
284667
|
const topOffset = opts.topOffset ?? 0;
|
|
284663
284668
|
const ptyRows = Math.max(5, opts.contentRows);
|
|
284664
284669
|
if (topOffset > 0 && isTTY5) {
|
|
284665
|
-
const
|
|
284666
|
-
const bottomBound = Math.min(
|
|
284667
|
-
process.stdout.write(`\x1B[${
|
|
284670
|
+
const L = layout();
|
|
284671
|
+
const bottomBound = Math.min(L.rows, topOffset + ptyRows);
|
|
284672
|
+
process.stdout.write(`\x1B[${L.contentTop};${bottomBound}r\x1B[${L.contentTop};1H`);
|
|
284668
284673
|
}
|
|
284669
284674
|
const initVimCmd = "let g:loaded_netrwPlugin=1 | let g:loaded_netrw=1 | set mouse=a autoread updatetime=300 signcolumn=no noswapfile | hi WinSeparator guifg=#000000 guibg=#000000 ctermfg=0 ctermbg=0 | hi VertSplit guifg=#000000 guibg=#000000 ctermfg=0 ctermbg=0 | hi StatusLine guifg=#bcbcbc guibg=#000000 ctermfg=250 ctermbg=0 | hi StatusLineNC guifg=#585858 guibg=#000000 ctermfg=240 ctermbg=0 | hi NeoTreeWinSeparator guifg=#000000 guibg=#000000 ctermfg=0 ctermbg=0";
|
|
284670
284675
|
const luaBootstrap = "lua " + [
|
|
@@ -285053,8 +285058,7 @@ function doCleanup(state) {
|
|
|
285053
285058
|
}
|
|
285054
285059
|
}
|
|
285055
285060
|
_state = null;
|
|
285056
|
-
|
|
285057
|
-
process.stdout.write(`\x1B[?1000l\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1004l\x1B[?2004l\x1B[1;${termRows}r\x1B[H\x1B[J`);
|
|
285061
|
+
process.stdout.write(`\x1B[?1000l\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1004l\x1B[?2004l\x1B[1;${termRows()}r\x1B[H\x1B[J`);
|
|
285058
285062
|
state.opts.onExit?.();
|
|
285059
285063
|
}
|
|
285060
285064
|
var isTTY5, PTY_MODE_ENABLE_RE, STDIN_MOUSE_FOCUS_RE, _state;
|
|
@@ -285062,6 +285066,7 @@ var init_neovim_mode = __esm({
|
|
|
285062
285066
|
"packages/cli/dist/tui/neovim-mode.js"() {
|
|
285063
285067
|
"use strict";
|
|
285064
285068
|
init_setup();
|
|
285069
|
+
init_layout2();
|
|
285065
285070
|
isTTY5 = process.stdout.isTTY ?? false;
|
|
285066
285071
|
PTY_MODE_ENABLE_RE = /\x1B\[\?(?:1004|2004)h/g;
|
|
285067
285072
|
STDIN_MOUSE_FOCUS_RE = /\x1B\[<[\d;]+[Mm]|\x1B\[M[\s\S]{3}|\x1B\[[IO]|\x1BO[ABCD]/g;
|
|
@@ -291094,14 +291099,15 @@ Clone a new voice: /voice clone <wav-file> [name]`);
|
|
|
291094
291099
|
renderInfo("Neovim mode stopped. Main waterfall restored.");
|
|
291095
291100
|
} else {
|
|
291096
291101
|
ctx3.retireCarousel?.();
|
|
291097
|
-
const
|
|
291098
|
-
const
|
|
291102
|
+
const L = layout();
|
|
291103
|
+
const contentRows = ctx3.availableContentRows?.() ?? Math.max(5, L.contentHeight);
|
|
291104
|
+
const cols = termCols();
|
|
291099
291105
|
const err = await startNeovimMode({
|
|
291100
291106
|
cwd: ctx3.repoRoot,
|
|
291101
291107
|
contentRows,
|
|
291102
291108
|
cols,
|
|
291103
|
-
topOffset:
|
|
291104
|
-
// start below
|
|
291109
|
+
topOffset: headerHeight(),
|
|
291110
|
+
// start below header (banner/carousel)
|
|
291105
291111
|
rl: ctx3.rl,
|
|
291106
291112
|
initialFile: arg || void 0,
|
|
291107
291113
|
onExit: () => {
|
|
@@ -294894,8 +294900,8 @@ async function showExposeDashboard(gateway, rl, ctx3) {
|
|
|
294894
294900
|
}
|
|
294895
294901
|
return;
|
|
294896
294902
|
}
|
|
294897
|
-
const cols = () =>
|
|
294898
|
-
const rows = () =>
|
|
294903
|
+
const cols = () => termCols();
|
|
294904
|
+
const rows = () => termRows();
|
|
294899
294905
|
const peerLedColor = (peerIdx) => {
|
|
294900
294906
|
const stops = [51, 81, 111, 141, 171, 201];
|
|
294901
294907
|
const code8 = stops[Math.min(peerIdx, stops.length - 1)] ?? 51;
|
|
@@ -296202,6 +296208,7 @@ var isTTY6, PHRASES, Carousel;
|
|
|
296202
296208
|
var init_carousel = __esm({
|
|
296203
296209
|
"packages/cli/dist/tui/carousel.js"() {
|
|
296204
296210
|
"use strict";
|
|
296211
|
+
init_layout2();
|
|
296205
296212
|
isTTY6 = process.stdout.isTTY ?? false;
|
|
296206
296213
|
PHRASES = [
|
|
296207
296214
|
// English
|
|
@@ -296285,7 +296292,7 @@ var init_carousel = __esm({
|
|
|
296285
296292
|
started = false;
|
|
296286
296293
|
resizeHandler = null;
|
|
296287
296294
|
constructor(customPhrases) {
|
|
296288
|
-
this.width =
|
|
296295
|
+
this.width = termCols();
|
|
296289
296296
|
const bank = customPhrases && customPhrases.length > 0 ? customPhrases : PHRASES;
|
|
296290
296297
|
const indices0 = Array.from({ length: bank.length }, (_, i2) => i2).sort(() => Math.random() - 0.5);
|
|
296291
296298
|
const indices1 = Array.from({ length: bank.length }, (_, i2) => i2).sort(() => Math.random() - 0.5);
|
|
@@ -296314,15 +296321,16 @@ var init_carousel = __esm({
|
|
|
296314
296321
|
if (!isTTY6)
|
|
296315
296322
|
return 0;
|
|
296316
296323
|
this.started = true;
|
|
296317
|
-
|
|
296318
|
-
|
|
296324
|
+
setHeaderHeight(this.reservedRows);
|
|
296325
|
+
const L = layout();
|
|
296326
|
+
process.stdout.write(`\x1B[${L.headerTop};1H`);
|
|
296319
296327
|
for (let i2 = 0; i2 < this.reservedRows; i2++) {
|
|
296320
296328
|
process.stdout.write("\x1B[2K\n");
|
|
296321
296329
|
}
|
|
296322
|
-
process.stdout.write(`\x1B[${
|
|
296323
|
-
process.stdout.write(`\x1B[${
|
|
296330
|
+
process.stdout.write(`\x1B[${L.contentTop};${L.rows}r`);
|
|
296331
|
+
process.stdout.write(`\x1B[${L.contentTop};1H`);
|
|
296324
296332
|
this.resizeHandler = () => {
|
|
296325
|
-
this.width =
|
|
296333
|
+
this.width = termCols();
|
|
296326
296334
|
this.rebuildRibbons();
|
|
296327
296335
|
};
|
|
296328
296336
|
process.stdout.on("resize", this.resizeHandler);
|
|
@@ -296345,13 +296353,14 @@ var init_carousel = __esm({
|
|
|
296345
296353
|
renderFrame() {
|
|
296346
296354
|
if (!isTTY6)
|
|
296347
296355
|
return;
|
|
296356
|
+
const L = layout();
|
|
296348
296357
|
let buf = "\x1B7";
|
|
296349
296358
|
buf += "\x1B[?7l";
|
|
296350
296359
|
for (let i2 = 0; i2 < this.rows.length; i2++) {
|
|
296351
296360
|
const line = this.extractWindow(this.rows[i2]);
|
|
296352
|
-
buf += `\x1B[${
|
|
296361
|
+
buf += `\x1B[${L.headerTop + i2};1H\x1B[2K${line}`;
|
|
296353
296362
|
}
|
|
296354
|
-
buf += `\x1B[
|
|
296363
|
+
buf += `\x1B[${L.headerBottom};1H\x1B[2K`;
|
|
296355
296364
|
buf += "\x1B[?7h";
|
|
296356
296365
|
buf += "\x1B8";
|
|
296357
296366
|
process.stdout.write(buf);
|
|
@@ -296425,10 +296434,12 @@ var init_carousel = __esm({
|
|
|
296425
296434
|
}
|
|
296426
296435
|
if (!isTTY6 || !this.started)
|
|
296427
296436
|
return;
|
|
296437
|
+
const L = layout();
|
|
296428
296438
|
let buf = "\x1B7";
|
|
296429
296439
|
for (let i2 = 0; i2 < this.reservedRows; i2++) {
|
|
296430
|
-
buf += `\x1B[${
|
|
296440
|
+
buf += `\x1B[${L.headerTop + i2};1H\x1B[2K`;
|
|
296431
296441
|
}
|
|
296442
|
+
setHeaderHeight(HEADER_ROWS);
|
|
296432
296443
|
buf += "\x1B[r";
|
|
296433
296444
|
buf += "\x1B8";
|
|
296434
296445
|
process.stdout.write(buf);
|
|
@@ -296481,8 +296492,8 @@ function getNodeMnemonic() {
|
|
|
296481
296492
|
}
|
|
296482
296493
|
}
|
|
296483
296494
|
function createDefaultBanner(version4 = "0.120.0") {
|
|
296484
|
-
const width =
|
|
296485
|
-
const rows =
|
|
296495
|
+
const width = termCols();
|
|
296496
|
+
const rows = headerHeight();
|
|
296486
296497
|
const yellow = tuiAccent() < 0 ? -1 : tuiAccent();
|
|
296487
296498
|
const bgBlack = tuiBg() < 0 ? -1 : tuiBg();
|
|
296488
296499
|
const grid = [];
|
|
@@ -296522,8 +296533,8 @@ function createDefaultBanner(version4 = "0.120.0") {
|
|
|
296522
296533
|
};
|
|
296523
296534
|
}
|
|
296524
296535
|
function createCohereBanner() {
|
|
296525
|
-
const width =
|
|
296526
|
-
const rows =
|
|
296536
|
+
const width = termCols();
|
|
296537
|
+
const rows = headerHeight();
|
|
296527
296538
|
const grid = [];
|
|
296528
296539
|
const bgColor = 0;
|
|
296529
296540
|
const fgColor = 226;
|
|
@@ -296556,8 +296567,8 @@ function createCohereBanner() {
|
|
|
296556
296567
|
};
|
|
296557
296568
|
}
|
|
296558
296569
|
function createSponsorBanner(sponsorName, tagline, primaryColor = 214, bgColor = 0) {
|
|
296559
|
-
const width =
|
|
296560
|
-
const rows =
|
|
296570
|
+
const width = termCols();
|
|
296571
|
+
const rows = headerHeight();
|
|
296561
296572
|
const grid = [];
|
|
296562
296573
|
for (let r2 = 0; r2 < rows; r2++) {
|
|
296563
296574
|
const row = [];
|
|
@@ -296642,7 +296653,7 @@ function fillGridRegion(grid, startRow, startCol, endRow, endCol, cell) {
|
|
|
296642
296653
|
}
|
|
296643
296654
|
}
|
|
296644
296655
|
function createAnimatedBanner(id, name10, frameBuilders, frameDurationMs, author = "user") {
|
|
296645
|
-
const width =
|
|
296656
|
+
const width = termCols();
|
|
296646
296657
|
return {
|
|
296647
296658
|
id,
|
|
296648
296659
|
name: name10,
|
|
@@ -296662,6 +296673,7 @@ var init_banner = __esm({
|
|
|
296662
296673
|
"packages/cli/dist/tui/banner.js"() {
|
|
296663
296674
|
"use strict";
|
|
296664
296675
|
init_theme();
|
|
296676
|
+
init_layout2();
|
|
296665
296677
|
isTTY7 = process.stdout.isTTY ?? false;
|
|
296666
296678
|
MNEMONIC_ADJECTIVES = [
|
|
296667
296679
|
"swift",
|
|
@@ -296753,7 +296765,9 @@ var init_banner = __esm({
|
|
|
296753
296765
|
timer = null;
|
|
296754
296766
|
frameTick = 0;
|
|
296755
296767
|
width;
|
|
296756
|
-
rows
|
|
296768
|
+
get rows() {
|
|
296769
|
+
return headerHeight();
|
|
296770
|
+
}
|
|
296757
296771
|
/** Callback fired after every frame render — used for header button overlay */
|
|
296758
296772
|
onAfterRender = null;
|
|
296759
296773
|
/** When set, the version text on row 1 becomes a pulsing UPDATE button */
|
|
@@ -296763,7 +296777,7 @@ var init_banner = __esm({
|
|
|
296763
296777
|
/** Whether header zone is focused (Ctrl+Tab highlight) */
|
|
296764
296778
|
_focused = false;
|
|
296765
296779
|
constructor() {
|
|
296766
|
-
this.width =
|
|
296780
|
+
this.width = termCols();
|
|
296767
296781
|
}
|
|
296768
296782
|
/** Signal that an update is available — enables pulsing UPDATE badge on row 1 */
|
|
296769
296783
|
setUpdateAvailable(latestVersion) {
|
|
@@ -296787,7 +296801,7 @@ var init_banner = __esm({
|
|
|
296787
296801
|
this.currentDesign = design;
|
|
296788
296802
|
this.currentFrame = 0;
|
|
296789
296803
|
this.frameTick = 0;
|
|
296790
|
-
this.width =
|
|
296804
|
+
this.width = termCols();
|
|
296791
296805
|
}
|
|
296792
296806
|
/** Get current design */
|
|
296793
296807
|
getDesign() {
|
|
@@ -296804,7 +296818,7 @@ var init_banner = __esm({
|
|
|
296804
296818
|
} else if (this.currentDesign.type === "cohere") {
|
|
296805
296819
|
this.currentDesign = createCohereBanner();
|
|
296806
296820
|
}
|
|
296807
|
-
this.width =
|
|
296821
|
+
this.width = termCols();
|
|
296808
296822
|
this.renderCurrentFrame();
|
|
296809
296823
|
}
|
|
296810
296824
|
/**
|
|
@@ -296818,7 +296832,7 @@ var init_banner = __esm({
|
|
|
296818
296832
|
return 0;
|
|
296819
296833
|
this.renderCurrentFrame();
|
|
296820
296834
|
this._resizeHandler = () => {
|
|
296821
|
-
this.width =
|
|
296835
|
+
this.width = termCols();
|
|
296822
296836
|
if (this.currentDesign) {
|
|
296823
296837
|
if (this.currentDesign.type === "default") {
|
|
296824
296838
|
const version4 = this.currentDesign.version ?? "0.0.0";
|
|
@@ -296826,8 +296840,8 @@ var init_banner = __esm({
|
|
|
296826
296840
|
} else if (this.currentDesign.type === "cohere") {
|
|
296827
296841
|
this.currentDesign = createCohereBanner();
|
|
296828
296842
|
}
|
|
296829
|
-
const
|
|
296830
|
-
process.stdout.write(`\x1B[${
|
|
296843
|
+
const L = layout();
|
|
296844
|
+
process.stdout.write(`\x1B[${L.contentTop};${L.rows}r`);
|
|
296831
296845
|
this.renderCurrentFrame();
|
|
296832
296846
|
}
|
|
296833
296847
|
};
|
|
@@ -296860,10 +296874,11 @@ var init_banner = __esm({
|
|
|
296860
296874
|
const frame = this.currentDesign.frames[this.currentFrame];
|
|
296861
296875
|
if (!frame)
|
|
296862
296876
|
return;
|
|
296863
|
-
this.width =
|
|
296877
|
+
this.width = termCols();
|
|
296864
296878
|
let buf = "\x1B[?2026h";
|
|
296879
|
+
const L = layout();
|
|
296865
296880
|
for (let r2 = 0; r2 < this.rows; r2++) {
|
|
296866
|
-
buf += `\x1B[${
|
|
296881
|
+
buf += `\x1B[${L.headerTop + r2};1H${tuiBg() >= 0 ? `\x1B[48;5;${tuiBg()}m` : "\x1B[49m"}\x1B[2K`;
|
|
296867
296882
|
const row = frame.grid[r2];
|
|
296868
296883
|
if (!row)
|
|
296869
296884
|
continue;
|
|
@@ -296898,16 +296913,15 @@ var init_banner = __esm({
|
|
|
296898
296913
|
}
|
|
296899
296914
|
if (this.onAfterRender)
|
|
296900
296915
|
this.onAfterRender();
|
|
296901
|
-
const
|
|
296902
|
-
const inputRow = termRows - 2;
|
|
296916
|
+
const Lp = layout();
|
|
296903
296917
|
try {
|
|
296904
|
-
process.stdout.write(`\x1B[${
|
|
296918
|
+
process.stdout.write(`\x1B[${Lp.footerInput};1H\x1B[?2026l`);
|
|
296905
296919
|
} catch {
|
|
296906
296920
|
}
|
|
296907
296921
|
}
|
|
296908
296922
|
/** Handle terminal resize */
|
|
296909
296923
|
handleResize() {
|
|
296910
|
-
this.width =
|
|
296924
|
+
this.width = termCols();
|
|
296911
296925
|
if (this.currentDesign) {
|
|
296912
296926
|
if (this.currentDesign.type === "cohere") {
|
|
296913
296927
|
this.currentDesign = createCohereBanner();
|
|
@@ -308768,10 +308782,11 @@ async function startInteractive(config, repoPath) {
|
|
|
308768
308782
|
}
|
|
308769
308783
|
let restoredSessionContext = null;
|
|
308770
308784
|
if (process.stdout.isTTY) {
|
|
308785
|
+
setTermSize(process.stdout.rows ?? 24, process.stdout.columns ?? 80);
|
|
308771
308786
|
process.stdout.write("\x1B[2J\x1B[3J\x1B]50;ClearScrollback\x07\x1B[H");
|
|
308772
308787
|
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1049h" + // enter alternate screen buffer
|
|
308773
308788
|
tuiBgSeq() + // theme bg for content area
|
|
308774
|
-
`\x1B[2J\x1B[3J\x1B[H\x1B[1;${
|
|
308789
|
+
`\x1B[2J\x1B[3J\x1B[H\x1B[1;${termRows()}r\x1B[?25l`);
|
|
308775
308790
|
const restoreScreen = () => {
|
|
308776
308791
|
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?25h\x1B[?1049l");
|
|
308777
308792
|
};
|
|
@@ -309470,9 +309485,8 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
309470
309485
|
const { MouseFilterStream: MouseFilterStream2 } = await Promise.resolve().then(() => (init_mouse_filter(), mouse_filter_exports));
|
|
309471
309486
|
let origTtyWriteRef = null;
|
|
309472
309487
|
const mouseFilter = new MouseFilterStream2((direction, lines, row) => {
|
|
309473
|
-
const rows = process.stdout.rows ?? 24;
|
|
309474
309488
|
const fh = statusBar._currentFooterHeight ?? 3;
|
|
309475
|
-
const footerStart =
|
|
309489
|
+
const footerStart = termRows() - fh + 1;
|
|
309476
309490
|
if (row >= footerStart) {
|
|
309477
309491
|
const arrowKey = direction === "up" ? { name: "up" } : { name: "down" };
|
|
309478
309492
|
const arrowSeq = direction === "up" ? "\x1B[A" : "\x1B[B";
|
|
@@ -309590,14 +309604,15 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
309590
309604
|
}
|
|
309591
309605
|
process.stdout.on("resize", () => {
|
|
309592
309606
|
statusBar.handleResize();
|
|
309607
|
+
setTermSize(process.stdout.rows ?? 24, process.stdout.columns ?? 80);
|
|
309593
309608
|
if (isNeovimActive()) {
|
|
309594
|
-
const contentRows = statusBar.isActive ? statusBar.availableContentRows : Math.max(5, (
|
|
309595
|
-
resizeNeovim(
|
|
309609
|
+
const contentRows = statusBar.isActive ? statusBar.availableContentRows : Math.max(5, termRows() - 6);
|
|
309610
|
+
resizeNeovim(termCols(), contentRows);
|
|
309596
309611
|
}
|
|
309597
309612
|
if (!carouselRetired && !isNeovimActive()) {
|
|
309598
|
-
const
|
|
309613
|
+
const tr = termRows();
|
|
309599
309614
|
const scrollStart = carousel.reservedRows + 1;
|
|
309600
|
-
const scrollEnd = Math.max(
|
|
309615
|
+
const scrollEnd = Math.max(tr - statusBar.reservedRows, scrollStart + 1);
|
|
309601
309616
|
let clearBuf = "";
|
|
309602
309617
|
for (let r2 = scrollStart; r2 <= scrollEnd; r2++) {
|
|
309603
309618
|
clearBuf += `\x1B[${r2};1H\x1B[2K`;
|
|
@@ -311206,7 +311221,7 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
|
|
|
311206
311221
|
return true;
|
|
311207
311222
|
},
|
|
311208
311223
|
availableContentRows() {
|
|
311209
|
-
return statusBar.isActive ? statusBar.availableContentRows : Math.max(3, (
|
|
311224
|
+
return statusBar.isActive ? statusBar.availableContentRows : Math.max(3, termRows() - 6);
|
|
311210
311225
|
},
|
|
311211
311226
|
showPrompt() {
|
|
311212
311227
|
showPrompt();
|
|
@@ -312546,6 +312561,7 @@ var init_interactive = __esm({
|
|
|
312546
312561
|
init_config();
|
|
312547
312562
|
init_updater();
|
|
312548
312563
|
init_commands();
|
|
312564
|
+
init_layout2();
|
|
312549
312565
|
init_setup();
|
|
312550
312566
|
init_model_picker();
|
|
312551
312567
|
init_project_context();
|
package/package.json
CHANGED