erosolar-cli 1.7.353 → 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 +23 -15
- package/dist/shell/terminalInput.d.ts.map +1 -1
- package/dist/shell/terminalInput.js +128 -220
- package/dist/shell/terminalInput.js.map +1 -1
- package/dist/shell/terminalInputAdapter.d.ts.map +1 -1
- package/dist/shell/terminalInputAdapter.js +5 -2
- 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;
|
|
@@ -328,17 +328,18 @@ export declare class TerminalInput extends EventEmitter {
|
|
|
328
328
|
*/
|
|
329
329
|
writeToScrollRegion(content: string): void;
|
|
330
330
|
/**
|
|
331
|
-
* Enter alternate screen buffer
|
|
332
|
-
*
|
|
331
|
+
* Enter alternate screen buffer.
|
|
332
|
+
* DISABLED: Using terminal-native mode for proper scrollback and text selection.
|
|
333
333
|
*/
|
|
334
334
|
enterAlternateScreen(): void;
|
|
335
335
|
/**
|
|
336
336
|
* Exit alternate screen buffer.
|
|
337
|
-
*
|
|
337
|
+
* DISABLED: Using terminal-native mode.
|
|
338
338
|
*/
|
|
339
339
|
exitAlternateScreen(): void;
|
|
340
340
|
/**
|
|
341
341
|
* Check if alternate screen buffer is currently active.
|
|
342
|
+
* Always returns false - using terminal-native mode.
|
|
342
343
|
*/
|
|
343
344
|
isAlternateScreenActive(): boolean;
|
|
344
345
|
/**
|
|
@@ -346,8 +347,9 @@ export declare class TerminalInput extends EventEmitter {
|
|
|
346
347
|
*/
|
|
347
348
|
getScrollbackSnapshot(): string[];
|
|
348
349
|
/**
|
|
349
|
-
* Clear the
|
|
350
|
-
*
|
|
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).
|
|
351
353
|
*/
|
|
352
354
|
clearScreen(): void;
|
|
353
355
|
/**
|
|
@@ -379,8 +381,9 @@ export declare class TerminalInput extends EventEmitter {
|
|
|
379
381
|
*/
|
|
380
382
|
private getPageSize;
|
|
381
383
|
/**
|
|
382
|
-
* Build scroll indicator for the divider line
|
|
383
|
-
*
|
|
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.
|
|
384
387
|
*/
|
|
385
388
|
private buildScrollIndicator;
|
|
386
389
|
private handleSpecialKey;
|
|
@@ -411,31 +414,36 @@ export declare class TerminalInput extends EventEmitter {
|
|
|
411
414
|
private addToScrollback;
|
|
412
415
|
/**
|
|
413
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.
|
|
414
419
|
*/
|
|
415
420
|
private scrollUp;
|
|
416
421
|
/**
|
|
417
422
|
* Scroll down by a number of lines (PageDown)
|
|
423
|
+
* Note: Scrollback disabled - see scrollUp comment
|
|
418
424
|
*/
|
|
419
425
|
private scrollDown;
|
|
420
426
|
/**
|
|
421
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.
|
|
422
430
|
*/
|
|
423
431
|
private scrollToTop;
|
|
424
432
|
/**
|
|
425
433
|
* Jump to the bottom (live mode)
|
|
434
|
+
* DISABLED: Scrollback navigation causes display corruption.
|
|
426
435
|
*/
|
|
427
436
|
private scrollToBottom;
|
|
428
437
|
/**
|
|
429
438
|
* Toggle scrollback mode on/off (Alt+S hotkey)
|
|
439
|
+
* DISABLED: Scrollback navigation causes display corruption in alternate screen mode.
|
|
430
440
|
*/
|
|
431
441
|
private toggleScrollbackMode;
|
|
432
442
|
/**
|
|
433
|
-
* Render the scrollback buffer view
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
* - Keyboard navigation hints
|
|
438
|
-
* - 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.
|
|
439
447
|
*/
|
|
440
448
|
private renderScrollbackView;
|
|
441
449
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terminalInput.d.ts","sourceRoot":"","sources":["../../src/shell/terminalInput.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAuD3C;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC;AACvD,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,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AAC,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;
|
|
@@ -702,112 +694,119 @@ export class TerminalInput extends EventEmitter {
|
|
|
702
694
|
*/
|
|
703
695
|
buildModeControls(cols) {
|
|
704
696
|
const width = Math.max(8, cols - 2);
|
|
705
|
-
const
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
// Streaming indicator
|
|
697
|
+
const leftParts = [];
|
|
698
|
+
const rightParts = [];
|
|
699
|
+
// Streaming indicator with animated spinner
|
|
709
700
|
if (this.streamingLabel) {
|
|
710
|
-
|
|
701
|
+
leftParts.push({ text: `◐ ${this.streamingLabel}`, tone: 'info' });
|
|
711
702
|
}
|
|
712
703
|
// Override status (warnings, errors)
|
|
713
704
|
if (this.overrideStatusMessage) {
|
|
714
|
-
|
|
705
|
+
leftParts.push({ text: `⚠ ${this.overrideStatusMessage}`, tone: 'warn' });
|
|
715
706
|
}
|
|
716
707
|
// Main status message
|
|
717
708
|
if (this.statusMessage) {
|
|
718
|
-
|
|
709
|
+
leftParts.push({ text: this.statusMessage, tone: this.streamingLabel ? 'muted' : 'info' });
|
|
710
|
+
}
|
|
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' });
|
|
716
|
+
}
|
|
717
|
+
// Edit mode toggle (Shift+Tab)
|
|
718
|
+
const editHotkey = this.formatHotkey('shift+tab');
|
|
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)
|
|
724
|
+
const verifyIcon = this.verificationEnabled ? '✓' : '○';
|
|
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' });
|
|
719
737
|
}
|
|
738
|
+
// === CONTEXTUAL INFO ===
|
|
720
739
|
// Queued commands
|
|
721
740
|
if (this.queue.length > 0) {
|
|
722
|
-
|
|
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
|
+
});
|
|
723
757
|
}
|
|
724
|
-
// Context remaining
|
|
758
|
+
// Context remaining warning with visual indicator
|
|
725
759
|
const contextRemaining = this.computeContextRemaining();
|
|
726
760
|
if (contextRemaining !== null) {
|
|
727
761
|
const tone = contextRemaining <= 10 ? 'warn' : contextRemaining <= 30 ? 'info' : 'muted';
|
|
728
762
|
const icon = contextRemaining <= 10 ? '⚠' : '⊛';
|
|
729
|
-
|
|
763
|
+
const label = contextRemaining === 0 && this.contextUsage !== null
|
|
764
|
+
? `${icon}compact!`
|
|
765
|
+
: `${icon}${contextRemaining}%`;
|
|
766
|
+
rightParts.push({ text: label, tone });
|
|
730
767
|
}
|
|
731
|
-
// Model
|
|
768
|
+
// Model/provider quick reference (compact)
|
|
732
769
|
if (this.modelLabel && !this.streamingLabel) {
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
if (statusParts.length > 0) {
|
|
736
|
-
lines.push(renderStatusLine(statusParts, width));
|
|
770
|
+
const shortModel = this.modelLabel.length > 12 ? this.modelLabel.slice(0, 10) + '..' : this.modelLabel;
|
|
771
|
+
rightParts.push({ text: shortModel, tone: 'muted' });
|
|
737
772
|
}
|
|
738
|
-
//
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
shortcutParts.push({ text: `[Esc] stop`, tone: 'warn' });
|
|
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);
|
|
743
777
|
}
|
|
744
|
-
|
|
745
|
-
const
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
})
|
|
750
|
-
// Verification toggle
|
|
751
|
-
const verifyIcon = this.verificationEnabled ? '✓' : '○';
|
|
752
|
-
shortcutParts.push({
|
|
753
|
-
text: `[Alt+V] verify${verifyIcon}`,
|
|
754
|
-
tone: this.verificationEnabled ? 'success' : 'muted'
|
|
755
|
-
});
|
|
756
|
-
// Auto-continue toggle
|
|
757
|
-
const autoIcon = this.autoContinueEnabled ? '✓' : '○';
|
|
758
|
-
shortcutParts.push({
|
|
759
|
-
text: `[Alt+C] auto${autoIcon}`,
|
|
760
|
-
tone: this.autoContinueEnabled ? 'success' : 'muted'
|
|
761
|
-
});
|
|
762
|
-
// Thinking mode (if available)
|
|
763
|
-
if (this.thinkingModeLabel) {
|
|
764
|
-
shortcutParts.push({
|
|
765
|
-
text: `[Alt+T] ${this.thinkingModeLabel}`,
|
|
766
|
-
tone: 'info'
|
|
767
|
-
});
|
|
768
|
-
}
|
|
769
|
-
// Context clear
|
|
770
|
-
shortcutParts.push({ text: `[Alt+X] clear`, tone: 'muted' });
|
|
771
|
-
// Scroll navigation
|
|
772
|
-
shortcutParts.push({ text: `[PgUp/PgDn] scroll`, tone: 'muted' });
|
|
773
|
-
lines.push(renderStatusLine(shortcutParts, width));
|
|
774
|
-
return lines.join('\n');
|
|
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}`;
|
|
775
784
|
}
|
|
776
785
|
formatHotkey(hotkey) {
|
|
777
786
|
const normalized = hotkey.trim().toLowerCase();
|
|
778
787
|
if (!normalized)
|
|
779
788
|
return hotkey;
|
|
780
789
|
const parts = normalized.split('+').filter(Boolean);
|
|
781
|
-
// Use readable key names instead of symbols for better terminal compatibility
|
|
782
790
|
const map = {
|
|
783
|
-
shift: '
|
|
784
|
-
sh: '
|
|
785
|
-
alt: '
|
|
786
|
-
option: '
|
|
787
|
-
opt: '
|
|
788
|
-
ctrl: '
|
|
789
|
-
control: '
|
|
790
|
-
cmd: '
|
|
791
|
-
meta: '
|
|
792
|
-
esc: 'Esc',
|
|
793
|
-
escape: 'Esc',
|
|
794
|
-
tab: 'Tab',
|
|
795
|
-
return: 'Enter',
|
|
796
|
-
enter: 'Enter',
|
|
797
|
-
pageup: 'PgUp',
|
|
798
|
-
pagedown: 'PgDn',
|
|
799
|
-
home: 'Home',
|
|
800
|
-
end: 'End',
|
|
791
|
+
shift: '⇧',
|
|
792
|
+
sh: '⇧',
|
|
793
|
+
alt: '⌥',
|
|
794
|
+
option: '⌥',
|
|
795
|
+
opt: '⌥',
|
|
796
|
+
ctrl: '⌃',
|
|
797
|
+
control: '⌃',
|
|
798
|
+
cmd: '⌘',
|
|
799
|
+
meta: '⌘',
|
|
801
800
|
};
|
|
802
801
|
const formatted = parts
|
|
803
802
|
.map((part) => {
|
|
804
|
-
const
|
|
805
|
-
if (
|
|
806
|
-
return
|
|
807
|
-
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();
|
|
808
807
|
})
|
|
809
|
-
.join('
|
|
810
|
-
return
|
|
808
|
+
.join('');
|
|
809
|
+
return formatted || hotkey;
|
|
811
810
|
}
|
|
812
811
|
computeContextRemaining() {
|
|
813
812
|
if (this.contextUsage === null) {
|
|
@@ -973,7 +972,7 @@ export class TerminalInput extends EventEmitter {
|
|
|
973
972
|
* Calculate chat box height.
|
|
974
973
|
*/
|
|
975
974
|
getChatBoxHeight() {
|
|
976
|
-
return
|
|
975
|
+
return 6; // Fixed: meta + divider + input + controls + buffer
|
|
977
976
|
}
|
|
978
977
|
/**
|
|
979
978
|
* @deprecated Use streamContent() instead
|
|
@@ -1009,41 +1008,26 @@ export class TerminalInput extends EventEmitter {
|
|
|
1009
1008
|
}
|
|
1010
1009
|
}
|
|
1011
1010
|
/**
|
|
1012
|
-
* Enter alternate screen buffer
|
|
1013
|
-
*
|
|
1011
|
+
* Enter alternate screen buffer.
|
|
1012
|
+
* DISABLED: Using terminal-native mode for proper scrollback and text selection.
|
|
1014
1013
|
*/
|
|
1015
1014
|
enterAlternateScreen() {
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
this.write(ESC.ENTER_ALT_SCREEN);
|
|
1019
|
-
this.write(ESC.HOME);
|
|
1020
|
-
this.write(ESC.CLEAR_SCREEN);
|
|
1021
|
-
this.contentRow = 1;
|
|
1022
|
-
this.alternateScreenActive = true;
|
|
1023
|
-
}
|
|
1024
|
-
finally {
|
|
1025
|
-
writeLock.unlock();
|
|
1026
|
-
}
|
|
1015
|
+
// Disabled - using terminal-native mode
|
|
1016
|
+
this.contentRow = 1;
|
|
1027
1017
|
}
|
|
1028
1018
|
/**
|
|
1029
1019
|
* Exit alternate screen buffer.
|
|
1030
|
-
*
|
|
1020
|
+
* DISABLED: Using terminal-native mode.
|
|
1031
1021
|
*/
|
|
1032
1022
|
exitAlternateScreen() {
|
|
1033
|
-
|
|
1034
|
-
try {
|
|
1035
|
-
this.write(ESC.EXIT_ALT_SCREEN);
|
|
1036
|
-
this.alternateScreenActive = false;
|
|
1037
|
-
}
|
|
1038
|
-
finally {
|
|
1039
|
-
writeLock.unlock();
|
|
1040
|
-
}
|
|
1023
|
+
// Disabled - using terminal-native mode
|
|
1041
1024
|
}
|
|
1042
1025
|
/**
|
|
1043
1026
|
* Check if alternate screen buffer is currently active.
|
|
1027
|
+
* Always returns false - using terminal-native mode.
|
|
1044
1028
|
*/
|
|
1045
1029
|
isAlternateScreenActive() {
|
|
1046
|
-
return
|
|
1030
|
+
return false;
|
|
1047
1031
|
}
|
|
1048
1032
|
/**
|
|
1049
1033
|
* Get a snapshot of the scrollback buffer (for display on exit).
|
|
@@ -1052,14 +1036,17 @@ export class TerminalInput extends EventEmitter {
|
|
|
1052
1036
|
return [...this.scrollbackBuffer];
|
|
1053
1037
|
}
|
|
1054
1038
|
/**
|
|
1055
|
-
* Clear the
|
|
1056
|
-
*
|
|
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).
|
|
1057
1042
|
*/
|
|
1058
1043
|
clearScreen() {
|
|
1059
1044
|
writeLock.lock('clearScreen');
|
|
1060
1045
|
try {
|
|
1046
|
+
// In native mode, scroll past existing content rather than clearing
|
|
1047
|
+
const { rows } = this.getSize();
|
|
1048
|
+
this.write('\n'.repeat(rows));
|
|
1061
1049
|
this.write(ESC.HOME);
|
|
1062
|
-
this.write(ESC.CLEAR_SCREEN);
|
|
1063
1050
|
this.contentRow = 1;
|
|
1064
1051
|
}
|
|
1065
1052
|
finally {
|
|
@@ -1227,25 +1214,12 @@ export class TerminalInput extends EventEmitter {
|
|
|
1227
1214
|
return Math.max(5, rows - chatBoxHeight - 2);
|
|
1228
1215
|
}
|
|
1229
1216
|
/**
|
|
1230
|
-
* Build scroll indicator for the divider line
|
|
1231
|
-
*
|
|
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.
|
|
1232
1220
|
*/
|
|
1233
1221
|
buildScrollIndicator() {
|
|
1234
|
-
|
|
1235
|
-
// In scrollback mode - show position
|
|
1236
|
-
if (this.isInScrollbackMode && this.scrollbackOffset > 0) {
|
|
1237
|
-
const { rows } = this.getSize();
|
|
1238
|
-
const chatBoxHeight = this.getChatBoxHeight();
|
|
1239
|
-
const viewportHeight = Math.max(1, rows - chatBoxHeight);
|
|
1240
|
-
const currentPos = Math.max(0, bufferSize - this.scrollbackOffset - viewportHeight);
|
|
1241
|
-
const pct = bufferSize > 0 ? Math.round((currentPos / bufferSize) * 100) : 0;
|
|
1242
|
-
return `↑${this.scrollbackOffset} · ${pct}% · PgUp/Dn`;
|
|
1243
|
-
}
|
|
1244
|
-
// Not in scrollback - show hint if there's history
|
|
1245
|
-
if (bufferSize > 20) {
|
|
1246
|
-
const sizeLabel = bufferSize >= 1000 ? `${Math.floor(bufferSize / 1000)}k` : `${bufferSize}`;
|
|
1247
|
-
return `↕${sizeLabel}L · PgUp`;
|
|
1248
|
-
}
|
|
1222
|
+
// Scrollback navigation disabled - no indicator needed
|
|
1249
1223
|
return null;
|
|
1250
1224
|
}
|
|
1251
1225
|
handleSpecialKey(_str, key) {
|
|
@@ -1307,10 +1281,11 @@ export class TerminalInput extends EventEmitter {
|
|
|
1307
1281
|
}
|
|
1308
1282
|
return true;
|
|
1309
1283
|
case 'pageup':
|
|
1310
|
-
|
|
1284
|
+
// Scrollback disabled in alternate screen mode
|
|
1285
|
+
// Users should use terminal's native scrollback if available
|
|
1311
1286
|
return true;
|
|
1312
1287
|
case 'pagedown':
|
|
1313
|
-
|
|
1288
|
+
// Scrollback disabled in alternate screen mode
|
|
1314
1289
|
return true;
|
|
1315
1290
|
case 'tab':
|
|
1316
1291
|
if (key.shift) {
|
|
@@ -1704,120 +1679,53 @@ export class TerminalInput extends EventEmitter {
|
|
|
1704
1679
|
}
|
|
1705
1680
|
/**
|
|
1706
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.
|
|
1707
1684
|
*/
|
|
1708
|
-
scrollUp(
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
// Calculate max scroll offset
|
|
1713
|
-
const maxOffset = Math.max(0, this.scrollbackBuffer.length - visibleLines);
|
|
1714
|
-
this.scrollbackOffset = Math.min(this.scrollbackOffset + lines, maxOffset);
|
|
1715
|
-
this.isInScrollbackMode = this.scrollbackOffset > 0;
|
|
1716
|
-
if (this.isInScrollbackMode) {
|
|
1717
|
-
this.renderScrollbackView();
|
|
1718
|
-
}
|
|
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
|
|
1719
1689
|
}
|
|
1720
1690
|
/**
|
|
1721
1691
|
* Scroll down by a number of lines (PageDown)
|
|
1692
|
+
* Note: Scrollback disabled - see scrollUp comment
|
|
1722
1693
|
*/
|
|
1723
|
-
scrollDown(
|
|
1724
|
-
|
|
1725
|
-
this.isInScrollbackMode = this.scrollbackOffset > 0;
|
|
1726
|
-
if (this.isInScrollbackMode) {
|
|
1727
|
-
this.renderScrollbackView();
|
|
1728
|
-
}
|
|
1729
|
-
else {
|
|
1730
|
-
// Returned to live mode - force re-render
|
|
1731
|
-
this.forceRender();
|
|
1732
|
-
}
|
|
1694
|
+
scrollDown(_lines = 10) {
|
|
1695
|
+
// Scrollback disabled
|
|
1733
1696
|
}
|
|
1734
1697
|
/**
|
|
1735
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.
|
|
1736
1701
|
*/
|
|
1737
1702
|
scrollToTop() {
|
|
1738
|
-
|
|
1739
|
-
const chatBoxHeight = this.getChatBoxHeight();
|
|
1740
|
-
const visibleLines = Math.max(1, rows - chatBoxHeight);
|
|
1741
|
-
const maxOffset = Math.max(0, this.scrollbackBuffer.length - visibleLines);
|
|
1742
|
-
this.scrollbackOffset = maxOffset;
|
|
1743
|
-
this.isInScrollbackMode = true;
|
|
1744
|
-
this.renderScrollbackView();
|
|
1703
|
+
// Disabled - causes display corruption in alternate screen buffer
|
|
1745
1704
|
}
|
|
1746
1705
|
/**
|
|
1747
1706
|
* Jump to the bottom (live mode)
|
|
1707
|
+
* DISABLED: Scrollback navigation causes display corruption.
|
|
1748
1708
|
*/
|
|
1749
1709
|
scrollToBottom() {
|
|
1710
|
+
// Reset scrollback state in case it was somehow enabled
|
|
1750
1711
|
this.scrollbackOffset = 0;
|
|
1751
1712
|
this.isInScrollbackMode = false;
|
|
1752
|
-
this.forceRender();
|
|
1753
1713
|
}
|
|
1754
1714
|
/**
|
|
1755
1715
|
* Toggle scrollback mode on/off (Alt+S hotkey)
|
|
1716
|
+
* DISABLED: Scrollback navigation causes display corruption in alternate screen mode.
|
|
1756
1717
|
*/
|
|
1757
1718
|
toggleScrollbackMode() {
|
|
1758
|
-
|
|
1759
|
-
this.scrollToBottom();
|
|
1760
|
-
}
|
|
1761
|
-
else if (this.scrollbackBuffer.length > 0) {
|
|
1762
|
-
this.scrollUp(20);
|
|
1763
|
-
}
|
|
1719
|
+
// Disabled - alternate screen buffer doesn't support manual scrollback rendering
|
|
1764
1720
|
}
|
|
1765
1721
|
/**
|
|
1766
|
-
* Render the scrollback buffer view
|
|
1767
|
-
*
|
|
1768
|
-
*
|
|
1769
|
-
*
|
|
1770
|
-
* - Keyboard navigation hints
|
|
1771
|
-
* - 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.
|
|
1772
1726
|
*/
|
|
1773
1727
|
renderScrollbackView() {
|
|
1774
|
-
|
|
1775
|
-
const chatBoxHeight = this.getChatBoxHeight();
|
|
1776
|
-
const contentHeight = Math.max(1, rows - chatBoxHeight);
|
|
1777
|
-
writeLock.lock('renderScrollback');
|
|
1778
|
-
try {
|
|
1779
|
-
this.write(ESC.SAVE);
|
|
1780
|
-
this.write(ESC.HIDE);
|
|
1781
|
-
// Clear content area
|
|
1782
|
-
for (let i = 1; i <= contentHeight; i++) {
|
|
1783
|
-
this.write(ESC.TO(i, 1));
|
|
1784
|
-
this.write(ESC.CLEAR_LINE);
|
|
1785
|
-
}
|
|
1786
|
-
// Calculate which lines to show
|
|
1787
|
-
const totalLines = this.scrollbackBuffer.length;
|
|
1788
|
-
const startIdx = Math.max(0, totalLines - this.scrollbackOffset - contentHeight);
|
|
1789
|
-
const endIdx = Math.max(0, totalLines - this.scrollbackOffset);
|
|
1790
|
-
const visibleLines = this.scrollbackBuffer.slice(startIdx, endIdx);
|
|
1791
|
-
// Build header bar with navigation hints
|
|
1792
|
-
const headerInfo = this.buildScrollbackHeader(cols, totalLines, startIdx, endIdx);
|
|
1793
|
-
this.write(ESC.TO(1, 1));
|
|
1794
|
-
this.write(headerInfo);
|
|
1795
|
-
// Render visible lines with line numbers and visual guides
|
|
1796
|
-
const lineNumWidth = String(totalLines).length + 1;
|
|
1797
|
-
const contentStart = 2; // Start after header
|
|
1798
|
-
for (let i = 0; i < Math.min(visibleLines.length, contentHeight - 1); i++) {
|
|
1799
|
-
const line = visibleLines[i] ?? '';
|
|
1800
|
-
const lineNum = startIdx + i + 1;
|
|
1801
|
-
this.write(ESC.TO(contentStart + i, 1));
|
|
1802
|
-
// Line number gutter
|
|
1803
|
-
const numStr = String(lineNum).padStart(lineNumWidth, ' ');
|
|
1804
|
-
this.write(theme.ui.muted(`${numStr} │ `));
|
|
1805
|
-
// Content with truncation
|
|
1806
|
-
const gutterWidth = lineNumWidth + 4;
|
|
1807
|
-
const maxLen = cols - gutterWidth - 2;
|
|
1808
|
-
const displayLine = line.length > maxLen ? line.slice(0, maxLen - 3) + '...' : line;
|
|
1809
|
-
this.write(displayLine);
|
|
1810
|
-
}
|
|
1811
|
-
// Add visual scroll track on the right edge
|
|
1812
|
-
this.renderScrollTrack(cols, contentHeight, totalLines, startIdx, endIdx);
|
|
1813
|
-
this.write(ESC.RESTORE);
|
|
1814
|
-
this.write(ESC.SHOW);
|
|
1815
|
-
}
|
|
1816
|
-
finally {
|
|
1817
|
-
writeLock.unlock();
|
|
1818
|
-
}
|
|
1819
|
-
// Re-render chat box
|
|
1820
|
-
this.forceRender();
|
|
1728
|
+
// Disabled - causes display corruption
|
|
1821
1729
|
}
|
|
1822
1730
|
/**
|
|
1823
1731
|
* Build scrollback header with navigation hints
|