erosolar-cli 1.7.354 → 1.7.355
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/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +2 -1
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/shell/terminalInput.d.ts +26 -17
- package/dist/shell/terminalInput.d.ts.map +1 -1
- package/dist/shell/terminalInput.js +140 -197
- package/dist/shell/terminalInput.js.map +1 -1
- package/dist/shell/terminalInputAdapter.d.ts.map +1 -1
- package/dist/shell/terminalInputAdapter.js +5 -4
- package/dist/shell/terminalInputAdapter.js.map +1 -1
- package/dist/subagents/taskRunner.d.ts.map +1 -1
- package/dist/subagents/taskRunner.js +7 -25
- package/dist/subagents/taskRunner.js.map +1 -1
- package/dist/tools/learnTools.js +127 -4
- package/dist/tools/learnTools.js.map +1 -1
- package/package.json +1 -1
|
@@ -125,8 +125,8 @@ export declare class TerminalInput extends EventEmitter {
|
|
|
125
125
|
*/
|
|
126
126
|
disableMouseTracking(): void;
|
|
127
127
|
/**
|
|
128
|
-
* Process raw terminal data (handles bracketed paste sequences
|
|
129
|
-
* Returns true if the data was consumed (paste sequence
|
|
128
|
+
* Process raw terminal data (handles bracketed paste sequences and mouse events)
|
|
129
|
+
* Returns true if the data was consumed (paste sequence)
|
|
130
130
|
*/
|
|
131
131
|
processRawData(data: string): {
|
|
132
132
|
consumed: boolean;
|
|
@@ -250,8 +250,9 @@ export declare class TerminalInput extends EventEmitter {
|
|
|
250
250
|
*/
|
|
251
251
|
private buildMetaLines;
|
|
252
252
|
/**
|
|
253
|
-
* Build mode controls line with
|
|
254
|
-
*
|
|
253
|
+
* Build mode controls line with all keyboard shortcuts.
|
|
254
|
+
* Shows status, all toggles, and contextual information.
|
|
255
|
+
* Enhanced with comprehensive feature status display.
|
|
255
256
|
*/
|
|
256
257
|
private buildModeControls;
|
|
257
258
|
private formatHotkey;
|
|
@@ -327,17 +328,18 @@ export declare class TerminalInput extends EventEmitter {
|
|
|
327
328
|
*/
|
|
328
329
|
writeToScrollRegion(content: string): void;
|
|
329
330
|
/**
|
|
330
|
-
* Enter alternate screen buffer
|
|
331
|
-
*
|
|
331
|
+
* Enter alternate screen buffer.
|
|
332
|
+
* DISABLED: Using terminal-native mode for proper scrollback and text selection.
|
|
332
333
|
*/
|
|
333
334
|
enterAlternateScreen(): void;
|
|
334
335
|
/**
|
|
335
336
|
* Exit alternate screen buffer.
|
|
336
|
-
*
|
|
337
|
+
* DISABLED: Using terminal-native mode.
|
|
337
338
|
*/
|
|
338
339
|
exitAlternateScreen(): void;
|
|
339
340
|
/**
|
|
340
341
|
* Check if alternate screen buffer is currently active.
|
|
342
|
+
* Always returns false - using terminal-native mode.
|
|
341
343
|
*/
|
|
342
344
|
isAlternateScreenActive(): boolean;
|
|
343
345
|
/**
|
|
@@ -345,8 +347,9 @@ export declare class TerminalInput extends EventEmitter {
|
|
|
345
347
|
*/
|
|
346
348
|
getScrollbackSnapshot(): string[];
|
|
347
349
|
/**
|
|
348
|
-
* Clear the
|
|
349
|
-
*
|
|
350
|
+
* Clear the visible terminal area and reset content position.
|
|
351
|
+
* In terminal-native mode, this just adds newlines to scroll past content
|
|
352
|
+
* rather than clearing history (preserving scrollback).
|
|
350
353
|
*/
|
|
351
354
|
clearScreen(): void;
|
|
352
355
|
/**
|
|
@@ -378,8 +381,9 @@ export declare class TerminalInput extends EventEmitter {
|
|
|
378
381
|
*/
|
|
379
382
|
private getPageSize;
|
|
380
383
|
/**
|
|
381
|
-
* Build scroll indicator for the divider line
|
|
382
|
-
*
|
|
384
|
+
* Build scroll indicator for the divider line.
|
|
385
|
+
* Scrollback navigation is disabled in alternate screen mode.
|
|
386
|
+
* This returns null - no scroll indicator is shown.
|
|
383
387
|
*/
|
|
384
388
|
private buildScrollIndicator;
|
|
385
389
|
private handleSpecialKey;
|
|
@@ -410,31 +414,36 @@ export declare class TerminalInput extends EventEmitter {
|
|
|
410
414
|
private addToScrollback;
|
|
411
415
|
/**
|
|
412
416
|
* Scroll up by a number of lines (PageUp)
|
|
417
|
+
* Note: Scrollback is disabled in alternate screen mode to avoid display corruption.
|
|
418
|
+
* Users should use their terminal's native scrollback or copy/paste features.
|
|
413
419
|
*/
|
|
414
420
|
private scrollUp;
|
|
415
421
|
/**
|
|
416
422
|
* Scroll down by a number of lines (PageDown)
|
|
423
|
+
* Note: Scrollback disabled - see scrollUp comment
|
|
417
424
|
*/
|
|
418
425
|
private scrollDown;
|
|
419
426
|
/**
|
|
420
427
|
* Jump to the top of scrollback buffer
|
|
428
|
+
* DISABLED: Scrollback navigation causes display corruption in alternate screen mode.
|
|
429
|
+
* The scrollback buffer is maintained but cannot be rendered properly.
|
|
421
430
|
*/
|
|
422
431
|
private scrollToTop;
|
|
423
432
|
/**
|
|
424
433
|
* Jump to the bottom (live mode)
|
|
434
|
+
* DISABLED: Scrollback navigation causes display corruption.
|
|
425
435
|
*/
|
|
426
436
|
private scrollToBottom;
|
|
427
437
|
/**
|
|
428
438
|
* Toggle scrollback mode on/off (Alt+S hotkey)
|
|
439
|
+
* DISABLED: Scrollback navigation causes display corruption in alternate screen mode.
|
|
429
440
|
*/
|
|
430
441
|
private toggleScrollbackMode;
|
|
431
442
|
/**
|
|
432
|
-
* Render the scrollback buffer view
|
|
433
|
-
*
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
* - Keyboard navigation hints
|
|
437
|
-
* - Animated indicators
|
|
443
|
+
* Render the scrollback buffer view.
|
|
444
|
+
* DISABLED: This causes display corruption in alternate screen mode.
|
|
445
|
+
* The alternate screen buffer has its own rendering model that conflicts with
|
|
446
|
+
* manual scroll region manipulation.
|
|
438
447
|
*/
|
|
439
448
|
private renderScrollbackView;
|
|
440
449
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terminalInput.d.ts","sourceRoot":"","sources":["../../src/shell/terminalInput.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;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AAC,qBAAqB;IAO7B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,sBAAsB;IAuB9B,OAAO,CAAC,iBAAiB;IAQzB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI;IAe7E,WAAW,IAAI,aAAa;IAI5B,aAAa,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI;IAIxC,OAAO,CAAC,WAAW;IAOnB,cAAc,IAAI,IAAI;IAKtB,OAAO,CAAC,uBAAuB;IAc/B,OAAO,CAAC,4BAA4B;IAQpC,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,OAAO;IAOf,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,QAAQ;IAUhB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,WAAW;CAIpB;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -173,8 +173,8 @@ export class TerminalInput extends EventEmitter {
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
|
-
* Process raw terminal data (handles bracketed paste sequences
|
|
177
|
-
* Returns true if the data was consumed (paste sequence
|
|
176
|
+
* Process raw terminal data (handles bracketed paste sequences and mouse events)
|
|
177
|
+
* Returns true if the data was consumed (paste sequence)
|
|
178
178
|
*/
|
|
179
179
|
processRawData(data) {
|
|
180
180
|
// Check for mouse events (SGR mode: \x1b[<button;x;yM or m)
|
|
@@ -190,14 +190,6 @@ export class TerminalInput extends EventEmitter {
|
|
|
190
190
|
const remaining = data.slice(mouseEventEnd);
|
|
191
191
|
return { consumed: true, passthrough: remaining };
|
|
192
192
|
}
|
|
193
|
-
// Filter out arrow key escape sequences (they're handled by keypress events)
|
|
194
|
-
// Arrow keys: \x1b[A (up), \x1b[B (down), \x1b[C (right), \x1b[D (left)
|
|
195
|
-
const arrowMatch = data.match(/\x1b\[[ABCD]/);
|
|
196
|
-
if (arrowMatch) {
|
|
197
|
-
// Arrow keys should be handled by keypress handler, strip them from passthrough
|
|
198
|
-
const filtered = data.replace(/\x1b\[[ABCD]/g, '');
|
|
199
|
-
return { consumed: filtered.length !== data.length, passthrough: filtered };
|
|
200
|
-
}
|
|
201
193
|
// Check for paste start
|
|
202
194
|
if (data.includes(ESC.PASTE_START)) {
|
|
203
195
|
this.isPasting = true;
|
|
@@ -696,83 +688,125 @@ export class TerminalInput extends EventEmitter {
|
|
|
696
688
|
return [`${leftText}${' '.repeat(spacing)}${rightText}`];
|
|
697
689
|
}
|
|
698
690
|
/**
|
|
699
|
-
* Build mode controls line with
|
|
700
|
-
*
|
|
691
|
+
* Build mode controls line with all keyboard shortcuts.
|
|
692
|
+
* Shows status, all toggles, and contextual information.
|
|
693
|
+
* Enhanced with comprehensive feature status display.
|
|
701
694
|
*/
|
|
702
695
|
buildModeControls(cols) {
|
|
703
696
|
const width = Math.max(8, cols - 2);
|
|
704
|
-
const
|
|
705
|
-
|
|
697
|
+
const leftParts = [];
|
|
698
|
+
const rightParts = [];
|
|
699
|
+
// Streaming indicator with animated spinner
|
|
706
700
|
if (this.streamingLabel) {
|
|
707
|
-
|
|
701
|
+
leftParts.push({ text: `◐ ${this.streamingLabel}`, tone: 'info' });
|
|
708
702
|
}
|
|
709
|
-
//
|
|
710
|
-
if (this.
|
|
711
|
-
|
|
703
|
+
// Override status (warnings, errors)
|
|
704
|
+
if (this.overrideStatusMessage) {
|
|
705
|
+
leftParts.push({ text: `⚠ ${this.overrideStatusMessage}`, tone: 'warn' });
|
|
712
706
|
}
|
|
713
|
-
//
|
|
714
|
-
if (this.
|
|
715
|
-
|
|
707
|
+
// Main status message
|
|
708
|
+
if (this.statusMessage) {
|
|
709
|
+
leftParts.push({ text: this.statusMessage, tone: this.streamingLabel ? 'muted' : 'info' });
|
|
716
710
|
}
|
|
717
|
-
|
|
718
|
-
|
|
711
|
+
// Scrollback indicator removed - scrollback is disabled in alternate screen mode
|
|
712
|
+
// === KEYBOARD SHORTCUTS ===
|
|
713
|
+
// Interrupt shortcut (during streaming)
|
|
714
|
+
if (this.mode === 'streaming' || this.scrollRegionActive) {
|
|
715
|
+
leftParts.push({ text: `${this.formatHotkey('esc')} stop`, tone: 'warn' });
|
|
719
716
|
}
|
|
720
|
-
//
|
|
717
|
+
// Edit mode toggle (Shift+Tab)
|
|
718
|
+
const editHotkey = this.formatHotkey('shift+tab');
|
|
721
719
|
const editIcon = this.editMode === 'display-edits' ? '✓' : '?';
|
|
720
|
+
const editLabel = this.editMode === 'display-edits' ? 'edits:auto' : 'edits:ask';
|
|
721
|
+
const editTone = this.editMode === 'display-edits' ? 'success' : 'muted';
|
|
722
|
+
leftParts.push({ text: `${editHotkey}${editIcon}${editLabel}`, tone: editTone });
|
|
723
|
+
// Verification toggle (Alt+V)
|
|
722
724
|
const verifyIcon = this.verificationEnabled ? '✓' : '○';
|
|
723
|
-
const
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
const
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
725
|
+
const verifyHotkey = this.formatHotkey(this.verificationHotkey || 'alt+v');
|
|
726
|
+
const verifyLabel = this.verificationEnabled ? 'verify' : 'no-verify';
|
|
727
|
+
leftParts.push({ text: `${verifyHotkey}${verifyIcon}${verifyLabel}`, tone: this.verificationEnabled ? 'success' : 'muted' });
|
|
728
|
+
// Auto-continue toggle (Alt+C)
|
|
729
|
+
const autoIcon = this.autoContinueEnabled ? '↻' : '○';
|
|
730
|
+
const continueHotkey = this.formatHotkey(this.autoContinueHotkey || 'alt+c');
|
|
731
|
+
const continueLabel = this.autoContinueEnabled ? 'auto' : 'manual';
|
|
732
|
+
leftParts.push({ text: `${continueHotkey}${autoIcon}${continueLabel}`, tone: this.autoContinueEnabled ? 'info' : 'muted' });
|
|
733
|
+
// Thinking mode toggle (if available)
|
|
734
|
+
if (this.thinkingModeLabel) {
|
|
735
|
+
const thinkingHotkey = this.formatHotkey(this.thinkingHotkey || '/thinking');
|
|
736
|
+
rightParts.push({ text: `${thinkingHotkey}◐${this.thinkingModeLabel}`, tone: 'info' });
|
|
737
|
+
}
|
|
738
|
+
// === CONTEXTUAL INFO ===
|
|
739
|
+
// Queued commands
|
|
740
|
+
if (this.queue.length > 0) {
|
|
741
|
+
const queueIcon = this.mode === 'streaming' ? '⏳' : '▸';
|
|
742
|
+
leftParts.push({ text: `${queueIcon}${this.queue.length}queued`, tone: 'info' });
|
|
743
|
+
}
|
|
744
|
+
// Scrollback buffer hint removed - scrollback navigation is disabled
|
|
745
|
+
// Multi-line indicator
|
|
746
|
+
if (this.buffer.includes('\n')) {
|
|
747
|
+
const lineCount = this.buffer.split('\n').length;
|
|
748
|
+
rightParts.push({ text: `${lineCount}L`, tone: 'muted' });
|
|
749
|
+
}
|
|
750
|
+
// Paste indicator
|
|
751
|
+
if (this.pastePlaceholders.length > 0) {
|
|
752
|
+
const latest = this.pastePlaceholders[this.pastePlaceholders.length - 1];
|
|
753
|
+
rightParts.push({
|
|
754
|
+
text: `paste#${latest.id}+${latest.lineCount}L`,
|
|
755
|
+
tone: 'info',
|
|
756
|
+
});
|
|
733
757
|
}
|
|
734
|
-
//
|
|
758
|
+
// Context remaining warning with visual indicator
|
|
759
|
+
const contextRemaining = this.computeContextRemaining();
|
|
760
|
+
if (contextRemaining !== null) {
|
|
761
|
+
const tone = contextRemaining <= 10 ? 'warn' : contextRemaining <= 30 ? 'info' : 'muted';
|
|
762
|
+
const icon = contextRemaining <= 10 ? '⚠' : '⊛';
|
|
763
|
+
const label = contextRemaining === 0 && this.contextUsage !== null
|
|
764
|
+
? `${icon}compact!`
|
|
765
|
+
: `${icon}${contextRemaining}%`;
|
|
766
|
+
rightParts.push({ text: label, tone });
|
|
767
|
+
}
|
|
768
|
+
// Model/provider quick reference (compact)
|
|
735
769
|
if (this.modelLabel && !this.streamingLabel) {
|
|
736
|
-
const shortModel = this.modelLabel.length >
|
|
737
|
-
|
|
770
|
+
const shortModel = this.modelLabel.length > 12 ? this.modelLabel.slice(0, 10) + '..' : this.modelLabel;
|
|
771
|
+
rightParts.push({ text: shortModel, tone: 'muted' });
|
|
772
|
+
}
|
|
773
|
+
// Render: left-aligned shortcuts, right-aligned context info
|
|
774
|
+
if (!rightParts.length || width < 60) {
|
|
775
|
+
const merged = rightParts.length ? [...leftParts, ...rightParts] : leftParts;
|
|
776
|
+
return renderStatusLine(merged, width);
|
|
738
777
|
}
|
|
739
|
-
|
|
778
|
+
const leftWidth = Math.max(12, Math.floor(width * 0.65));
|
|
779
|
+
const rightWidth = Math.max(14, width - leftWidth - 1);
|
|
780
|
+
const leftText = renderStatusLine(leftParts, leftWidth);
|
|
781
|
+
const rightText = renderStatusLine(rightParts, rightWidth);
|
|
782
|
+
const spacing = Math.max(1, width - this.visibleLength(leftText) - this.visibleLength(rightText));
|
|
783
|
+
return `${leftText}${' '.repeat(spacing)}${rightText}`;
|
|
740
784
|
}
|
|
741
785
|
formatHotkey(hotkey) {
|
|
742
786
|
const normalized = hotkey.trim().toLowerCase();
|
|
743
787
|
if (!normalized)
|
|
744
788
|
return hotkey;
|
|
745
789
|
const parts = normalized.split('+').filter(Boolean);
|
|
746
|
-
// Use readable key names instead of symbols for better terminal compatibility
|
|
747
790
|
const map = {
|
|
748
|
-
shift: '
|
|
749
|
-
sh: '
|
|
750
|
-
alt: '
|
|
751
|
-
option: '
|
|
752
|
-
opt: '
|
|
753
|
-
ctrl: '
|
|
754
|
-
control: '
|
|
755
|
-
cmd: '
|
|
756
|
-
meta: '
|
|
757
|
-
esc: 'Esc',
|
|
758
|
-
escape: 'Esc',
|
|
759
|
-
tab: 'Tab',
|
|
760
|
-
return: 'Enter',
|
|
761
|
-
enter: 'Enter',
|
|
762
|
-
pageup: 'PgUp',
|
|
763
|
-
pagedown: 'PgDn',
|
|
764
|
-
home: 'Home',
|
|
765
|
-
end: 'End',
|
|
791
|
+
shift: '⇧',
|
|
792
|
+
sh: '⇧',
|
|
793
|
+
alt: '⌥',
|
|
794
|
+
option: '⌥',
|
|
795
|
+
opt: '⌥',
|
|
796
|
+
ctrl: '⌃',
|
|
797
|
+
control: '⌃',
|
|
798
|
+
cmd: '⌘',
|
|
799
|
+
meta: '⌘',
|
|
766
800
|
};
|
|
767
801
|
const formatted = parts
|
|
768
802
|
.map((part) => {
|
|
769
|
-
const
|
|
770
|
-
if (
|
|
771
|
-
return
|
|
772
|
-
return part.length === 1 ? part.toUpperCase() : part.
|
|
803
|
+
const symbol = map[part];
|
|
804
|
+
if (symbol)
|
|
805
|
+
return symbol;
|
|
806
|
+
return part.length === 1 ? part.toUpperCase() : part.toUpperCase();
|
|
773
807
|
})
|
|
774
|
-
.join('
|
|
775
|
-
return
|
|
808
|
+
.join('');
|
|
809
|
+
return formatted || hotkey;
|
|
776
810
|
}
|
|
777
811
|
computeContextRemaining() {
|
|
778
812
|
if (this.contextUsage === null) {
|
|
@@ -938,7 +972,7 @@ export class TerminalInput extends EventEmitter {
|
|
|
938
972
|
* Calculate chat box height.
|
|
939
973
|
*/
|
|
940
974
|
getChatBoxHeight() {
|
|
941
|
-
return
|
|
975
|
+
return 6; // Fixed: meta + divider + input + controls + buffer
|
|
942
976
|
}
|
|
943
977
|
/**
|
|
944
978
|
* @deprecated Use streamContent() instead
|
|
@@ -974,41 +1008,26 @@ export class TerminalInput extends EventEmitter {
|
|
|
974
1008
|
}
|
|
975
1009
|
}
|
|
976
1010
|
/**
|
|
977
|
-
* Enter alternate screen buffer
|
|
978
|
-
*
|
|
1011
|
+
* Enter alternate screen buffer.
|
|
1012
|
+
* DISABLED: Using terminal-native mode for proper scrollback and text selection.
|
|
979
1013
|
*/
|
|
980
1014
|
enterAlternateScreen() {
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
this.write(ESC.ENTER_ALT_SCREEN);
|
|
984
|
-
this.write(ESC.HOME);
|
|
985
|
-
this.write(ESC.CLEAR_SCREEN);
|
|
986
|
-
this.contentRow = 1;
|
|
987
|
-
this.alternateScreenActive = true;
|
|
988
|
-
}
|
|
989
|
-
finally {
|
|
990
|
-
writeLock.unlock();
|
|
991
|
-
}
|
|
1015
|
+
// Disabled - using terminal-native mode
|
|
1016
|
+
this.contentRow = 1;
|
|
992
1017
|
}
|
|
993
1018
|
/**
|
|
994
1019
|
* Exit alternate screen buffer.
|
|
995
|
-
*
|
|
1020
|
+
* DISABLED: Using terminal-native mode.
|
|
996
1021
|
*/
|
|
997
1022
|
exitAlternateScreen() {
|
|
998
|
-
|
|
999
|
-
try {
|
|
1000
|
-
this.write(ESC.EXIT_ALT_SCREEN);
|
|
1001
|
-
this.alternateScreenActive = false;
|
|
1002
|
-
}
|
|
1003
|
-
finally {
|
|
1004
|
-
writeLock.unlock();
|
|
1005
|
-
}
|
|
1023
|
+
// Disabled - using terminal-native mode
|
|
1006
1024
|
}
|
|
1007
1025
|
/**
|
|
1008
1026
|
* Check if alternate screen buffer is currently active.
|
|
1027
|
+
* Always returns false - using terminal-native mode.
|
|
1009
1028
|
*/
|
|
1010
1029
|
isAlternateScreenActive() {
|
|
1011
|
-
return
|
|
1030
|
+
return false;
|
|
1012
1031
|
}
|
|
1013
1032
|
/**
|
|
1014
1033
|
* Get a snapshot of the scrollback buffer (for display on exit).
|
|
@@ -1017,14 +1036,17 @@ export class TerminalInput extends EventEmitter {
|
|
|
1017
1036
|
return [...this.scrollbackBuffer];
|
|
1018
1037
|
}
|
|
1019
1038
|
/**
|
|
1020
|
-
* Clear the
|
|
1021
|
-
*
|
|
1039
|
+
* Clear the visible terminal area and reset content position.
|
|
1040
|
+
* In terminal-native mode, this just adds newlines to scroll past content
|
|
1041
|
+
* rather than clearing history (preserving scrollback).
|
|
1022
1042
|
*/
|
|
1023
1043
|
clearScreen() {
|
|
1024
1044
|
writeLock.lock('clearScreen');
|
|
1025
1045
|
try {
|
|
1046
|
+
// In native mode, scroll past existing content rather than clearing
|
|
1047
|
+
const { rows } = this.getSize();
|
|
1048
|
+
this.write('\n'.repeat(rows));
|
|
1026
1049
|
this.write(ESC.HOME);
|
|
1027
|
-
this.write(ESC.CLEAR_SCREEN);
|
|
1028
1050
|
this.contentRow = 1;
|
|
1029
1051
|
}
|
|
1030
1052
|
finally {
|
|
@@ -1192,25 +1214,12 @@ export class TerminalInput extends EventEmitter {
|
|
|
1192
1214
|
return Math.max(5, rows - chatBoxHeight - 2);
|
|
1193
1215
|
}
|
|
1194
1216
|
/**
|
|
1195
|
-
* Build scroll indicator for the divider line
|
|
1196
|
-
*
|
|
1217
|
+
* Build scroll indicator for the divider line.
|
|
1218
|
+
* Scrollback navigation is disabled in alternate screen mode.
|
|
1219
|
+
* This returns null - no scroll indicator is shown.
|
|
1197
1220
|
*/
|
|
1198
1221
|
buildScrollIndicator() {
|
|
1199
|
-
|
|
1200
|
-
// In scrollback mode - show position
|
|
1201
|
-
if (this.isInScrollbackMode && this.scrollbackOffset > 0) {
|
|
1202
|
-
const { rows } = this.getSize();
|
|
1203
|
-
const chatBoxHeight = this.getChatBoxHeight();
|
|
1204
|
-
const viewportHeight = Math.max(1, rows - chatBoxHeight);
|
|
1205
|
-
const currentPos = Math.max(0, bufferSize - this.scrollbackOffset - viewportHeight);
|
|
1206
|
-
const pct = bufferSize > 0 ? Math.round((currentPos / bufferSize) * 100) : 0;
|
|
1207
|
-
return `↑${this.scrollbackOffset} · ${pct}% · PgUp/Dn`;
|
|
1208
|
-
}
|
|
1209
|
-
// Not in scrollback - show hint if there's history
|
|
1210
|
-
if (bufferSize > 20) {
|
|
1211
|
-
const sizeLabel = bufferSize >= 1000 ? `${Math.floor(bufferSize / 1000)}k` : `${bufferSize}`;
|
|
1212
|
-
return `↕${sizeLabel}L · PgUp`;
|
|
1213
|
-
}
|
|
1222
|
+
// Scrollback navigation disabled - no indicator needed
|
|
1214
1223
|
return null;
|
|
1215
1224
|
}
|
|
1216
1225
|
handleSpecialKey(_str, key) {
|
|
@@ -1272,10 +1281,11 @@ export class TerminalInput extends EventEmitter {
|
|
|
1272
1281
|
}
|
|
1273
1282
|
return true;
|
|
1274
1283
|
case 'pageup':
|
|
1275
|
-
|
|
1284
|
+
// Scrollback disabled in alternate screen mode
|
|
1285
|
+
// Users should use terminal's native scrollback if available
|
|
1276
1286
|
return true;
|
|
1277
1287
|
case 'pagedown':
|
|
1278
|
-
|
|
1288
|
+
// Scrollback disabled in alternate screen mode
|
|
1279
1289
|
return true;
|
|
1280
1290
|
case 'tab':
|
|
1281
1291
|
if (key.shift) {
|
|
@@ -1669,120 +1679,53 @@ export class TerminalInput extends EventEmitter {
|
|
|
1669
1679
|
}
|
|
1670
1680
|
/**
|
|
1671
1681
|
* Scroll up by a number of lines (PageUp)
|
|
1682
|
+
* Note: Scrollback is disabled in alternate screen mode to avoid display corruption.
|
|
1683
|
+
* Users should use their terminal's native scrollback or copy/paste features.
|
|
1672
1684
|
*/
|
|
1673
|
-
scrollUp(
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
// Calculate max scroll offset
|
|
1678
|
-
const maxOffset = Math.max(0, this.scrollbackBuffer.length - visibleLines);
|
|
1679
|
-
this.scrollbackOffset = Math.min(this.scrollbackOffset + lines, maxOffset);
|
|
1680
|
-
this.isInScrollbackMode = this.scrollbackOffset > 0;
|
|
1681
|
-
if (this.isInScrollbackMode) {
|
|
1682
|
-
this.renderScrollbackView();
|
|
1683
|
-
}
|
|
1685
|
+
scrollUp(_lines = 10) {
|
|
1686
|
+
// Scrollback disabled - alternate screen buffer doesn't support it well
|
|
1687
|
+
// The scrollback buffer is still maintained for potential future use
|
|
1688
|
+
// Users can select and copy text normally since mouse tracking is off
|
|
1684
1689
|
}
|
|
1685
1690
|
/**
|
|
1686
1691
|
* Scroll down by a number of lines (PageDown)
|
|
1692
|
+
* Note: Scrollback disabled - see scrollUp comment
|
|
1687
1693
|
*/
|
|
1688
|
-
scrollDown(
|
|
1689
|
-
|
|
1690
|
-
this.isInScrollbackMode = this.scrollbackOffset > 0;
|
|
1691
|
-
if (this.isInScrollbackMode) {
|
|
1692
|
-
this.renderScrollbackView();
|
|
1693
|
-
}
|
|
1694
|
-
else {
|
|
1695
|
-
// Returned to live mode - force re-render
|
|
1696
|
-
this.forceRender();
|
|
1697
|
-
}
|
|
1694
|
+
scrollDown(_lines = 10) {
|
|
1695
|
+
// Scrollback disabled
|
|
1698
1696
|
}
|
|
1699
1697
|
/**
|
|
1700
1698
|
* Jump to the top of scrollback buffer
|
|
1699
|
+
* DISABLED: Scrollback navigation causes display corruption in alternate screen mode.
|
|
1700
|
+
* The scrollback buffer is maintained but cannot be rendered properly.
|
|
1701
1701
|
*/
|
|
1702
1702
|
scrollToTop() {
|
|
1703
|
-
|
|
1704
|
-
const chatBoxHeight = this.getChatBoxHeight();
|
|
1705
|
-
const visibleLines = Math.max(1, rows - chatBoxHeight);
|
|
1706
|
-
const maxOffset = Math.max(0, this.scrollbackBuffer.length - visibleLines);
|
|
1707
|
-
this.scrollbackOffset = maxOffset;
|
|
1708
|
-
this.isInScrollbackMode = true;
|
|
1709
|
-
this.renderScrollbackView();
|
|
1703
|
+
// Disabled - causes display corruption in alternate screen buffer
|
|
1710
1704
|
}
|
|
1711
1705
|
/**
|
|
1712
1706
|
* Jump to the bottom (live mode)
|
|
1707
|
+
* DISABLED: Scrollback navigation causes display corruption.
|
|
1713
1708
|
*/
|
|
1714
1709
|
scrollToBottom() {
|
|
1710
|
+
// Reset scrollback state in case it was somehow enabled
|
|
1715
1711
|
this.scrollbackOffset = 0;
|
|
1716
1712
|
this.isInScrollbackMode = false;
|
|
1717
|
-
this.forceRender();
|
|
1718
1713
|
}
|
|
1719
1714
|
/**
|
|
1720
1715
|
* Toggle scrollback mode on/off (Alt+S hotkey)
|
|
1716
|
+
* DISABLED: Scrollback navigation causes display corruption in alternate screen mode.
|
|
1721
1717
|
*/
|
|
1722
1718
|
toggleScrollbackMode() {
|
|
1723
|
-
|
|
1724
|
-
this.scrollToBottom();
|
|
1725
|
-
}
|
|
1726
|
-
else if (this.scrollbackBuffer.length > 0) {
|
|
1727
|
-
this.scrollUp(20);
|
|
1728
|
-
}
|
|
1719
|
+
// Disabled - alternate screen buffer doesn't support manual scrollback rendering
|
|
1729
1720
|
}
|
|
1730
1721
|
/**
|
|
1731
|
-
* Render the scrollback buffer view
|
|
1732
|
-
*
|
|
1733
|
-
*
|
|
1734
|
-
*
|
|
1735
|
-
* - Keyboard navigation hints
|
|
1736
|
-
* - Animated indicators
|
|
1722
|
+
* Render the scrollback buffer view.
|
|
1723
|
+
* DISABLED: This causes display corruption in alternate screen mode.
|
|
1724
|
+
* The alternate screen buffer has its own rendering model that conflicts with
|
|
1725
|
+
* manual scroll region manipulation.
|
|
1737
1726
|
*/
|
|
1738
1727
|
renderScrollbackView() {
|
|
1739
|
-
|
|
1740
|
-
const chatBoxHeight = this.getChatBoxHeight();
|
|
1741
|
-
const contentHeight = Math.max(1, rows - chatBoxHeight);
|
|
1742
|
-
writeLock.lock('renderScrollback');
|
|
1743
|
-
try {
|
|
1744
|
-
this.write(ESC.SAVE);
|
|
1745
|
-
this.write(ESC.HIDE);
|
|
1746
|
-
// Clear content area
|
|
1747
|
-
for (let i = 1; i <= contentHeight; i++) {
|
|
1748
|
-
this.write(ESC.TO(i, 1));
|
|
1749
|
-
this.write(ESC.CLEAR_LINE);
|
|
1750
|
-
}
|
|
1751
|
-
// Calculate which lines to show
|
|
1752
|
-
const totalLines = this.scrollbackBuffer.length;
|
|
1753
|
-
const startIdx = Math.max(0, totalLines - this.scrollbackOffset - contentHeight);
|
|
1754
|
-
const endIdx = Math.max(0, totalLines - this.scrollbackOffset);
|
|
1755
|
-
const visibleLines = this.scrollbackBuffer.slice(startIdx, endIdx);
|
|
1756
|
-
// Build header bar with navigation hints
|
|
1757
|
-
const headerInfo = this.buildScrollbackHeader(cols, totalLines, startIdx, endIdx);
|
|
1758
|
-
this.write(ESC.TO(1, 1));
|
|
1759
|
-
this.write(headerInfo);
|
|
1760
|
-
// Render visible lines with line numbers and visual guides
|
|
1761
|
-
const lineNumWidth = String(totalLines).length + 1;
|
|
1762
|
-
const contentStart = 2; // Start after header
|
|
1763
|
-
for (let i = 0; i < Math.min(visibleLines.length, contentHeight - 1); i++) {
|
|
1764
|
-
const line = visibleLines[i] ?? '';
|
|
1765
|
-
const lineNum = startIdx + i + 1;
|
|
1766
|
-
this.write(ESC.TO(contentStart + i, 1));
|
|
1767
|
-
// Line number gutter
|
|
1768
|
-
const numStr = String(lineNum).padStart(lineNumWidth, ' ');
|
|
1769
|
-
this.write(theme.ui.muted(`${numStr} │ `));
|
|
1770
|
-
// Content with truncation
|
|
1771
|
-
const gutterWidth = lineNumWidth + 4;
|
|
1772
|
-
const maxLen = cols - gutterWidth - 2;
|
|
1773
|
-
const displayLine = line.length > maxLen ? line.slice(0, maxLen - 3) + '...' : line;
|
|
1774
|
-
this.write(displayLine);
|
|
1775
|
-
}
|
|
1776
|
-
// Add visual scroll track on the right edge
|
|
1777
|
-
this.renderScrollTrack(cols, contentHeight, totalLines, startIdx, endIdx);
|
|
1778
|
-
this.write(ESC.RESTORE);
|
|
1779
|
-
this.write(ESC.SHOW);
|
|
1780
|
-
}
|
|
1781
|
-
finally {
|
|
1782
|
-
writeLock.unlock();
|
|
1783
|
-
}
|
|
1784
|
-
// Re-render chat box
|
|
1785
|
-
this.forceRender();
|
|
1728
|
+
// Disabled - causes display corruption
|
|
1786
1729
|
}
|
|
1787
1730
|
/**
|
|
1788
1731
|
* Build scrollback header with navigation hints
|