omnius 1.0.164 → 1.0.165
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 +67 -17
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -570619,8 +570619,8 @@ function layout() {
|
|
|
570619
570619
|
const headerContent = 2;
|
|
570620
570620
|
const headerBottom = hh;
|
|
570621
570621
|
const contentTop = headerBottom + 1;
|
|
570622
|
-
const footerMetrics = rows;
|
|
570623
|
-
const footerBoxBottom =
|
|
570622
|
+
const footerMetrics = _footerMetricsVisible ? rows : -1;
|
|
570623
|
+
const footerBoxBottom = _footerMetricsVisible ? rows - 1 : rows;
|
|
570624
570624
|
const footerBoxTop = rows - fh + 1;
|
|
570625
570625
|
const footerInput = footerBoxTop + 1;
|
|
570626
570626
|
const FOOTER_SPACER_ROWS = 1;
|
|
@@ -570653,6 +570653,7 @@ function layout() {
|
|
|
570653
570653
|
footerInput,
|
|
570654
570654
|
footerBoxBottom,
|
|
570655
570655
|
footerMetrics,
|
|
570656
|
+
footerMetricsVisible: _footerMetricsVisible,
|
|
570656
570657
|
scrollRegionTop: contentTop,
|
|
570657
570658
|
scrollRegionBottom: contentBottom,
|
|
570658
570659
|
footerHeight: fh,
|
|
@@ -570664,7 +570665,12 @@ function setTermSize(rows, cols) {
|
|
|
570664
570665
|
_termCols = cols;
|
|
570665
570666
|
}
|
|
570666
570667
|
function setFooterHeight(height) {
|
|
570667
|
-
|
|
570668
|
+
const minRows = _footerMetricsVisible ? FOOTER_MIN_ROWS : FOOTER_NO_METRICS_MIN_ROWS;
|
|
570669
|
+
_footerHeight = Math.max(minRows, height);
|
|
570670
|
+
}
|
|
570671
|
+
function setFooterMetricsVisible(visible) {
|
|
570672
|
+
_footerMetricsVisible = visible;
|
|
570673
|
+
setFooterHeight(_footerHeight);
|
|
570668
570674
|
}
|
|
570669
570675
|
function setHeaderHeight(height) {
|
|
570670
570676
|
_headerHeight = Math.max(1, height);
|
|
@@ -570693,17 +570699,19 @@ function notifyLayoutResize() {
|
|
|
570693
570699
|
}
|
|
570694
570700
|
}
|
|
570695
570701
|
}
|
|
570696
|
-
var HEADER_ROWS, FOOTER_MIN_ROWS, CONTENT_SPACER_ROWS, _termRows, _termCols, _footerHeight, _headerHeight, _tasksHeight, _resizeListeners;
|
|
570702
|
+
var HEADER_ROWS, FOOTER_MIN_ROWS, FOOTER_NO_METRICS_MIN_ROWS, CONTENT_SPACER_ROWS, _termRows, _termCols, _footerHeight, _headerHeight, _footerMetricsVisible, _tasksHeight, _resizeListeners;
|
|
570697
570703
|
var init_layout2 = __esm({
|
|
570698
570704
|
"packages/cli/src/tui/layout.ts"() {
|
|
570699
570705
|
"use strict";
|
|
570700
570706
|
HEADER_ROWS = 3;
|
|
570701
570707
|
FOOTER_MIN_ROWS = 4;
|
|
570708
|
+
FOOTER_NO_METRICS_MIN_ROWS = 3;
|
|
570702
570709
|
CONTENT_SPACER_ROWS = 1;
|
|
570703
570710
|
_termRows = 24;
|
|
570704
570711
|
_termCols = 80;
|
|
570705
570712
|
_footerHeight = FOOTER_MIN_ROWS;
|
|
570706
570713
|
_headerHeight = HEADER_ROWS;
|
|
570714
|
+
_footerMetricsVisible = true;
|
|
570707
570715
|
_tasksHeight = 0;
|
|
570708
570716
|
_resizeListeners = [];
|
|
570709
570717
|
}
|
|
@@ -582854,9 +582862,11 @@ var init_status_bar = __esm({
|
|
|
582854
582862
|
_brailleSpinner = new BrailleSpinner();
|
|
582855
582863
|
/** Slow refresh timer for monitoring bar when braille spinner is off */
|
|
582856
582864
|
_monitorTimer = null;
|
|
582857
|
-
/** Current dynamic footer height
|
|
582865
|
+
/** Current dynamic footer height: box top + input rows + box bottom + optional metrics. */
|
|
582858
582866
|
_currentFooterHeight = 4;
|
|
582859
582867
|
// box-top(1) + input(1) + box-bottom(1) + metrics(1)
|
|
582868
|
+
/** Whether the bottom metrics row is visible. Ctrl+I toggles this. */
|
|
582869
|
+
_footerMetricsVisible = true;
|
|
582860
582870
|
/** Timestamp when streaming started (for token rate calculation) */
|
|
582861
582871
|
_streamStartTime = 0;
|
|
582862
582872
|
/** Current package version (shown in metrics row, rightmost) */
|
|
@@ -583972,6 +583982,7 @@ var init_status_bar = __esm({
|
|
|
583972
583982
|
});
|
|
583973
583983
|
}
|
|
583974
583984
|
setTermSize(process.stdout.rows ?? 24, process.stdout.columns ?? 80);
|
|
583985
|
+
setFooterMetricsVisible(this._footerMetricsVisible);
|
|
583975
583986
|
this._prevTermRows = termRows();
|
|
583976
583987
|
this._prevTermCols = termCols();
|
|
583977
583988
|
this.applyScrollRegion(true);
|
|
@@ -584222,6 +584233,23 @@ var init_status_bar = __esm({
|
|
|
584222
584233
|
this.renderFooterAndPositionInput();
|
|
584223
584234
|
}
|
|
584224
584235
|
}
|
|
584236
|
+
toggleFooterMetrics() {
|
|
584237
|
+
this.setFooterMetricsVisible(!this._footerMetricsVisible);
|
|
584238
|
+
return this._footerMetricsVisible;
|
|
584239
|
+
}
|
|
584240
|
+
setFooterMetricsVisible(visible) {
|
|
584241
|
+
if (this._footerMetricsVisible === visible) return;
|
|
584242
|
+
this._footerMetricsVisible = visible;
|
|
584243
|
+
setFooterMetricsVisible(visible);
|
|
584244
|
+
if (!this.active) {
|
|
584245
|
+
this.updateFooterHeight();
|
|
584246
|
+
return;
|
|
584247
|
+
}
|
|
584248
|
+
this.renderFooterAndPositionInput(true);
|
|
584249
|
+
}
|
|
584250
|
+
isFooterMetricsVisible() {
|
|
584251
|
+
return this._footerMetricsVisible;
|
|
584252
|
+
}
|
|
584225
584253
|
/** Set/get COHERE participation state — shows 🌐 in metrics when active */
|
|
584226
584254
|
setCohereActive(active) {
|
|
584227
584255
|
this._cohereActive = active;
|
|
@@ -584386,7 +584414,8 @@ var init_status_bar = __esm({
|
|
|
584386
584414
|
this.repaintContent();
|
|
584387
584415
|
const pos = this.rowPositions(termRows());
|
|
584388
584416
|
const writer = this._origWrite ?? process.stdout.write.bind(process.stdout);
|
|
584389
|
-
if (
|
|
584417
|
+
if (pos.metricsRow <= 0) {
|
|
584418
|
+
} else if (ok3) {
|
|
584390
584419
|
writer(
|
|
584391
584420
|
`\x1B[${pos.metricsRow};1H\x1B[2K\x1B[38;5;${TEXT_PRIMARY}m ✓ Copied to clipboard\x1B[0m`
|
|
584392
584421
|
);
|
|
@@ -584408,9 +584437,11 @@ var init_status_bar = __esm({
|
|
|
584408
584437
|
this._textSelection.armBlockMode();
|
|
584409
584438
|
const pos = this.rowPositions(termRows());
|
|
584410
584439
|
const writer = this._origWrite ?? process.stdout.write.bind(process.stdout);
|
|
584411
|
-
|
|
584412
|
-
|
|
584413
|
-
|
|
584440
|
+
if (pos.metricsRow > 0) {
|
|
584441
|
+
writer(
|
|
584442
|
+
`\x1B[${pos.metricsRow};1H\x1B[2K\x1B[38;5;${TEXT_PRIMARY}m ■ Block selection mode — click and drag\x1B[0m`
|
|
584443
|
+
);
|
|
584444
|
+
}
|
|
584414
584445
|
setTimeout(() => {
|
|
584415
584446
|
if (this.active) this.renderFooterAndPositionInput();
|
|
584416
584447
|
}, 1500);
|
|
@@ -584643,7 +584674,10 @@ var init_status_bar = __esm({
|
|
|
584643
584674
|
buf += `${PANEL_BG_SEQ}\x1B[K\x1B[${row};${w}H${BOX_FG}${BOX_V3}${RESET4}${PANEL_BG_SEQ}`;
|
|
584644
584675
|
}
|
|
584645
584676
|
buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL3}${BOX_H3.repeat(Math.max(0, boxInnerP))}${BOX_BR3}${RESET4}${PANEL_BG_SEQ}`;
|
|
584646
|
-
|
|
584677
|
+
if (pos.metricsRow > 0) {
|
|
584678
|
+
buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET4}${PANEL_BG_SEQ}`;
|
|
584679
|
+
}
|
|
584680
|
+
buf += `\x1B[?7h\x1B[${pos.inputStartRow + 1};1H`;
|
|
584647
584681
|
this.termWrite(buf);
|
|
584648
584682
|
this.rememberFooterPaint(pos.inputStartRow);
|
|
584649
584683
|
if (this._bannerRefresh) this._bannerRefresh();
|
|
@@ -585773,7 +585807,8 @@ ${CONTENT_BG_SEQ}`);
|
|
|
585773
585807
|
this._updateSuggestions();
|
|
585774
585808
|
const inputLines = this.computeInputLineCount(termWidth);
|
|
585775
585809
|
const suggestionRows = this._suggestions.length > 0 ? this._suggestions.length + 1 : 1;
|
|
585776
|
-
const
|
|
585810
|
+
const metricsRows = this._footerMetricsVisible ? 1 : 0;
|
|
585811
|
+
const newHeight = metricsRows + 1 + inputLines + suggestionRows;
|
|
585777
585812
|
if (newHeight !== this._currentFooterHeight) {
|
|
585778
585813
|
this._currentFooterHeight = newHeight;
|
|
585779
585814
|
setTermSize(process.stdout.rows ?? 24, process.stdout.columns ?? 80);
|
|
@@ -585787,7 +585822,8 @@ ${CONTENT_BG_SEQ}`);
|
|
|
585787
585822
|
this._updateSuggestions();
|
|
585788
585823
|
const inputLines = this.computeInputLineCount(termWidth);
|
|
585789
585824
|
const suggestionRows = this._suggestions.length > 0 ? this._suggestions.length + 1 : 1;
|
|
585790
|
-
|
|
585825
|
+
const metricsRows = this._footerMetricsVisible ? 1 : 0;
|
|
585826
|
+
return metricsRows + 1 + inputLines + suggestionRows !== this._currentFooterHeight;
|
|
585791
585827
|
}
|
|
585792
585828
|
/** Compute absolute row positions for all footer elements.
|
|
585793
585829
|
* DELEGATES TO layout() — the centralized layout manager.
|
|
@@ -585971,7 +586007,9 @@ ${CONTENT_BG_SEQ}`);
|
|
|
585971
586007
|
} else {
|
|
585972
586008
|
buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL3}${BOX_H3.repeat(Math.max(0, boxInner))}${BOX_BR3}${RESET4}${PANEL_BG_SEQ}`;
|
|
585973
586009
|
}
|
|
585974
|
-
|
|
586010
|
+
if (pos.metricsRow > 0) {
|
|
586011
|
+
buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET4}${PANEL_BG_SEQ}`;
|
|
586012
|
+
}
|
|
585975
586013
|
buf += "\x1B[?7h";
|
|
585976
586014
|
if (this.writeDepth === 0) {
|
|
585977
586015
|
buf += `\x1B[${cursorTermRow};${inputWrap.cursorCol}H${CURSOR_BLINK_BLOCK}\x1B[?25h`;
|
|
@@ -586022,7 +586060,10 @@ ${CONTENT_BG_SEQ}`);
|
|
|
586022
586060
|
} else {
|
|
586023
586061
|
buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL3}${BOX_H3.repeat(Math.max(0, boxInnerR))}${BOX_BR3}${RESET4}`;
|
|
586024
586062
|
}
|
|
586025
|
-
|
|
586063
|
+
if (pos.metricsRow > 0) {
|
|
586064
|
+
buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET4}${PANEL_BG_SEQ}`;
|
|
586065
|
+
}
|
|
586066
|
+
buf += "\x1B[?7h\x1B8" + // DEC restore cursor
|
|
586026
586067
|
(this.writeDepth === 0 ? `${CURSOR_BLINK_BLOCK}\x1B[?25h` : "");
|
|
586027
586068
|
this.termWrite(buf);
|
|
586028
586069
|
this.rememberFooterPaint(pos.inputStartRow);
|
|
@@ -586089,7 +586130,9 @@ ${CONTENT_BG_SEQ}`);
|
|
|
586089
586130
|
}
|
|
586090
586131
|
const boxInnerS = w - 2;
|
|
586091
586132
|
buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL3}${BOX_H3.repeat(Math.max(0, boxInnerS))}${BOX_BR3}${RESET4}`;
|
|
586092
|
-
|
|
586133
|
+
if (pos.metricsRow > 0) {
|
|
586134
|
+
buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET4}`;
|
|
586135
|
+
}
|
|
586093
586136
|
buf += "\x1B[?7h";
|
|
586094
586137
|
buf += "\x1B8";
|
|
586095
586138
|
if (heightDelta > 0) {
|
|
@@ -586128,7 +586171,9 @@ ${CONTENT_BG_SEQ}`);
|
|
|
586128
586171
|
}
|
|
586129
586172
|
}
|
|
586130
586173
|
buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL3}${BOX_H3.repeat(Math.max(0, boxInnerH))}${BOX_BR3}${RESET4}${PANEL_BG_SEQ}`;
|
|
586131
|
-
|
|
586174
|
+
if (pos.metricsRow > 0) {
|
|
586175
|
+
buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET4}${PANEL_BG_SEQ}`;
|
|
586176
|
+
}
|
|
586132
586177
|
buf += "\x1B[?7h\x1B8\x1B[?25l";
|
|
586133
586178
|
this.termWrite(buf);
|
|
586134
586179
|
this.rememberFooterPaint(pos.inputStartRow);
|
|
@@ -586331,6 +586376,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
586331
586376
|
if (onEscape) di.on("escape", () => onEscape());
|
|
586332
586377
|
if (onCtrlO) di.on("ctrl-o", () => onCtrlO());
|
|
586333
586378
|
if (onCtrlL) di.on("ctrl-l", () => onCtrlL());
|
|
586379
|
+
di.on("ctrl-i", () => self2.toggleFooterMetrics());
|
|
586334
586380
|
di.on("pageup", () => self2.pageUpContent());
|
|
586335
586381
|
di.on("pagedown", () => self2.pageDownContent());
|
|
586336
586382
|
di.on("shiftup", () => self2.scrollContentUp(3));
|
|
@@ -639501,6 +639547,10 @@ var init_direct_input = __esm({
|
|
|
639501
639547
|
return;
|
|
639502
639548
|
}
|
|
639503
639549
|
}
|
|
639550
|
+
if (hasCtrl && !hasShift && (codepoint === 73 || codepoint === 105)) {
|
|
639551
|
+
this.emit("ctrl-i");
|
|
639552
|
+
return;
|
|
639553
|
+
}
|
|
639504
639554
|
return;
|
|
639505
639555
|
}
|
|
639506
639556
|
}
|
|
@@ -639612,7 +639662,7 @@ var init_direct_input = __esm({
|
|
|
639612
639662
|
/** Handle Tab completion */
|
|
639613
639663
|
_handleTab() {
|
|
639614
639664
|
if (this.line.length === 0) {
|
|
639615
|
-
this.emit("
|
|
639665
|
+
this.emit("ctrl-i");
|
|
639616
639666
|
return;
|
|
639617
639667
|
}
|
|
639618
639668
|
if (!this._completer) return;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.165",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.165",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED