erosolar-cli 1.7.359 → 1.7.361
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 +2 -0
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +29 -10
- 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 +142 -195
- 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/dist/ui/ShellUIAdapter.d.ts +27 -0
- package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
- package/dist/ui/ShellUIAdapter.js +175 -9
- package/dist/ui/ShellUIAdapter.js.map +1 -1
- package/dist/ui/compactRenderer.d.ts +139 -0
- package/dist/ui/compactRenderer.d.ts.map +1 -0
- package/dist/ui/compactRenderer.js +398 -0
- package/dist/ui/compactRenderer.js.map +1 -0
- package/dist/ui/inPlaceUpdater.d.ts +181 -0
- package/dist/ui/inPlaceUpdater.d.ts.map +1 -0
- package/dist/ui/inPlaceUpdater.js +515 -0
- package/dist/ui/inPlaceUpdater.js.map +1 -0
- package/dist/ui/theme.d.ts +108 -3
- package/dist/ui/theme.d.ts.map +1 -1
- package/dist/ui/theme.js +124 -3
- package/dist/ui/theme.js.map +1 -1
- package/dist/ui/toolDisplay.d.ts +44 -0
- package/dist/ui/toolDisplay.d.ts.map +1 -1
- package/dist/ui/toolDisplay.js +147 -1
- package/dist/ui/toolDisplay.js.map +1 -1
- package/dist/ui/unified/index.d.ts +11 -0
- package/dist/ui/unified/index.d.ts.map +1 -1
- package/dist/ui/unified/index.js +16 -0
- package/dist/ui/unified/index.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 all keyboard shortcuts
|
|
254
|
-
* Shows
|
|
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;;;;;;;;;;;;;;;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,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI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AS;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,79 +688,125 @@ export class TerminalInput extends EventEmitter {
|
|
|
696
688
|
return [`${leftText}${' '.repeat(spacing)}${rightText}`];
|
|
697
689
|
}
|
|
698
690
|
/**
|
|
699
|
-
* Build mode controls line with all keyboard shortcuts
|
|
700
|
-
* Shows
|
|
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
|
-
|
|
708
|
-
|
|
701
|
+
leftParts.push({ text: `◐ ${this.streamingLabel}`, tone: 'info' });
|
|
702
|
+
}
|
|
703
|
+
// Override status (warnings, errors)
|
|
704
|
+
if (this.overrideStatusMessage) {
|
|
705
|
+
leftParts.push({ text: `⚠ ${this.overrideStatusMessage}`, tone: 'warn' });
|
|
709
706
|
}
|
|
710
|
-
//
|
|
707
|
+
// Main status message
|
|
708
|
+
if (this.statusMessage) {
|
|
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');
|
|
711
719
|
const editIcon = this.editMode === 'display-edits' ? '✓' : '?';
|
|
720
|
+
const editLabel = this.editMode === 'display-edits' ? 'edits:auto' : 'edits:ask';
|
|
712
721
|
const editTone = this.editMode === 'display-edits' ? 'success' : 'muted';
|
|
713
|
-
|
|
722
|
+
leftParts.push({ text: `${editHotkey}${editIcon}${editLabel}`, tone: editTone });
|
|
723
|
+
// Verification toggle (Alt+V)
|
|
714
724
|
const verifyIcon = this.verificationEnabled ? '✓' : '○';
|
|
715
|
-
const
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
//
|
|
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
|
+
});
|
|
757
|
+
}
|
|
758
|
+
// Context remaining warning with visual indicator
|
|
724
759
|
const contextRemaining = this.computeContextRemaining();
|
|
725
760
|
if (contextRemaining !== null) {
|
|
726
761
|
const tone = contextRemaining <= 10 ? 'warn' : contextRemaining <= 30 ? 'info' : 'muted';
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
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)
|
|
769
|
+
if (this.modelLabel && !this.streamingLabel) {
|
|
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);
|
|
777
|
+
}
|
|
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}`;
|
|
736
784
|
}
|
|
737
785
|
formatHotkey(hotkey) {
|
|
738
786
|
const normalized = hotkey.trim().toLowerCase();
|
|
739
787
|
if (!normalized)
|
|
740
788
|
return hotkey;
|
|
741
789
|
const parts = normalized.split('+').filter(Boolean);
|
|
742
|
-
// Use readable key names instead of symbols for better terminal compatibility
|
|
743
790
|
const map = {
|
|
744
|
-
shift: '
|
|
745
|
-
sh: '
|
|
746
|
-
alt: '
|
|
747
|
-
option: '
|
|
748
|
-
opt: '
|
|
749
|
-
ctrl: '
|
|
750
|
-
control: '
|
|
751
|
-
cmd: '
|
|
752
|
-
meta: '
|
|
753
|
-
esc: 'Esc',
|
|
754
|
-
escape: 'Esc',
|
|
755
|
-
tab: 'Tab',
|
|
756
|
-
return: 'Enter',
|
|
757
|
-
enter: 'Enter',
|
|
758
|
-
pageup: 'PgUp',
|
|
759
|
-
pagedown: 'PgDn',
|
|
760
|
-
home: 'Home',
|
|
761
|
-
end: 'End',
|
|
791
|
+
shift: '⇧',
|
|
792
|
+
sh: '⇧',
|
|
793
|
+
alt: '⌥',
|
|
794
|
+
option: '⌥',
|
|
795
|
+
opt: '⌥',
|
|
796
|
+
ctrl: '⌃',
|
|
797
|
+
control: '⌃',
|
|
798
|
+
cmd: '⌘',
|
|
799
|
+
meta: '⌘',
|
|
762
800
|
};
|
|
763
801
|
const formatted = parts
|
|
764
802
|
.map((part) => {
|
|
765
|
-
const
|
|
766
|
-
if (
|
|
767
|
-
return
|
|
768
|
-
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();
|
|
769
807
|
})
|
|
770
|
-
.join('
|
|
771
|
-
return
|
|
808
|
+
.join('');
|
|
809
|
+
return formatted || hotkey;
|
|
772
810
|
}
|
|
773
811
|
computeContextRemaining() {
|
|
774
812
|
if (this.contextUsage === null) {
|
|
@@ -934,7 +972,7 @@ export class TerminalInput extends EventEmitter {
|
|
|
934
972
|
* Calculate chat box height.
|
|
935
973
|
*/
|
|
936
974
|
getChatBoxHeight() {
|
|
937
|
-
return
|
|
975
|
+
return 6; // Fixed: meta + divider + input + controls + buffer
|
|
938
976
|
}
|
|
939
977
|
/**
|
|
940
978
|
* @deprecated Use streamContent() instead
|
|
@@ -970,41 +1008,26 @@ export class TerminalInput extends EventEmitter {
|
|
|
970
1008
|
}
|
|
971
1009
|
}
|
|
972
1010
|
/**
|
|
973
|
-
* Enter alternate screen buffer
|
|
974
|
-
*
|
|
1011
|
+
* Enter alternate screen buffer.
|
|
1012
|
+
* DISABLED: Using terminal-native mode for proper scrollback and text selection.
|
|
975
1013
|
*/
|
|
976
1014
|
enterAlternateScreen() {
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
this.write(ESC.ENTER_ALT_SCREEN);
|
|
980
|
-
this.write(ESC.HOME);
|
|
981
|
-
this.write(ESC.CLEAR_SCREEN);
|
|
982
|
-
this.contentRow = 1;
|
|
983
|
-
this.alternateScreenActive = true;
|
|
984
|
-
}
|
|
985
|
-
finally {
|
|
986
|
-
writeLock.unlock();
|
|
987
|
-
}
|
|
1015
|
+
// Disabled - using terminal-native mode
|
|
1016
|
+
this.contentRow = 1;
|
|
988
1017
|
}
|
|
989
1018
|
/**
|
|
990
1019
|
* Exit alternate screen buffer.
|
|
991
|
-
*
|
|
1020
|
+
* DISABLED: Using terminal-native mode.
|
|
992
1021
|
*/
|
|
993
1022
|
exitAlternateScreen() {
|
|
994
|
-
|
|
995
|
-
try {
|
|
996
|
-
this.write(ESC.EXIT_ALT_SCREEN);
|
|
997
|
-
this.alternateScreenActive = false;
|
|
998
|
-
}
|
|
999
|
-
finally {
|
|
1000
|
-
writeLock.unlock();
|
|
1001
|
-
}
|
|
1023
|
+
// Disabled - using terminal-native mode
|
|
1002
1024
|
}
|
|
1003
1025
|
/**
|
|
1004
1026
|
* Check if alternate screen buffer is currently active.
|
|
1027
|
+
* Always returns false - using terminal-native mode.
|
|
1005
1028
|
*/
|
|
1006
1029
|
isAlternateScreenActive() {
|
|
1007
|
-
return
|
|
1030
|
+
return false;
|
|
1008
1031
|
}
|
|
1009
1032
|
/**
|
|
1010
1033
|
* Get a snapshot of the scrollback buffer (for display on exit).
|
|
@@ -1013,14 +1036,17 @@ export class TerminalInput extends EventEmitter {
|
|
|
1013
1036
|
return [...this.scrollbackBuffer];
|
|
1014
1037
|
}
|
|
1015
1038
|
/**
|
|
1016
|
-
* Clear the
|
|
1017
|
-
*
|
|
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).
|
|
1018
1042
|
*/
|
|
1019
1043
|
clearScreen() {
|
|
1020
1044
|
writeLock.lock('clearScreen');
|
|
1021
1045
|
try {
|
|
1046
|
+
// In native mode, scroll past existing content rather than clearing
|
|
1047
|
+
const { rows } = this.getSize();
|
|
1048
|
+
this.write('\n'.repeat(rows));
|
|
1022
1049
|
this.write(ESC.HOME);
|
|
1023
|
-
this.write(ESC.CLEAR_SCREEN);
|
|
1024
1050
|
this.contentRow = 1;
|
|
1025
1051
|
}
|
|
1026
1052
|
finally {
|
|
@@ -1188,25 +1214,12 @@ export class TerminalInput extends EventEmitter {
|
|
|
1188
1214
|
return Math.max(5, rows - chatBoxHeight - 2);
|
|
1189
1215
|
}
|
|
1190
1216
|
/**
|
|
1191
|
-
* Build scroll indicator for the divider line
|
|
1192
|
-
*
|
|
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.
|
|
1193
1220
|
*/
|
|
1194
1221
|
buildScrollIndicator() {
|
|
1195
|
-
|
|
1196
|
-
// In scrollback mode - show position
|
|
1197
|
-
if (this.isInScrollbackMode && this.scrollbackOffset > 0) {
|
|
1198
|
-
const { rows } = this.getSize();
|
|
1199
|
-
const chatBoxHeight = this.getChatBoxHeight();
|
|
1200
|
-
const viewportHeight = Math.max(1, rows - chatBoxHeight);
|
|
1201
|
-
const currentPos = Math.max(0, bufferSize - this.scrollbackOffset - viewportHeight);
|
|
1202
|
-
const pct = bufferSize > 0 ? Math.round((currentPos / bufferSize) * 100) : 0;
|
|
1203
|
-
return `↑${this.scrollbackOffset} · ${pct}% · PgUp/Dn`;
|
|
1204
|
-
}
|
|
1205
|
-
// Not in scrollback - show hint if there's history
|
|
1206
|
-
if (bufferSize > 20) {
|
|
1207
|
-
const sizeLabel = bufferSize >= 1000 ? `${Math.floor(bufferSize / 1000)}k` : `${bufferSize}`;
|
|
1208
|
-
return `↕${sizeLabel}L · PgUp`;
|
|
1209
|
-
}
|
|
1222
|
+
// Scrollback navigation disabled - no indicator needed
|
|
1210
1223
|
return null;
|
|
1211
1224
|
}
|
|
1212
1225
|
handleSpecialKey(_str, key) {
|
|
@@ -1268,10 +1281,11 @@ export class TerminalInput extends EventEmitter {
|
|
|
1268
1281
|
}
|
|
1269
1282
|
return true;
|
|
1270
1283
|
case 'pageup':
|
|
1271
|
-
|
|
1284
|
+
// Scrollback disabled in alternate screen mode
|
|
1285
|
+
// Users should use terminal's native scrollback if available
|
|
1272
1286
|
return true;
|
|
1273
1287
|
case 'pagedown':
|
|
1274
|
-
|
|
1288
|
+
// Scrollback disabled in alternate screen mode
|
|
1275
1289
|
return true;
|
|
1276
1290
|
case 'tab':
|
|
1277
1291
|
if (key.shift) {
|
|
@@ -1665,120 +1679,53 @@ export class TerminalInput extends EventEmitter {
|
|
|
1665
1679
|
}
|
|
1666
1680
|
/**
|
|
1667
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.
|
|
1668
1684
|
*/
|
|
1669
|
-
scrollUp(
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
// Calculate max scroll offset
|
|
1674
|
-
const maxOffset = Math.max(0, this.scrollbackBuffer.length - visibleLines);
|
|
1675
|
-
this.scrollbackOffset = Math.min(this.scrollbackOffset + lines, maxOffset);
|
|
1676
|
-
this.isInScrollbackMode = this.scrollbackOffset > 0;
|
|
1677
|
-
if (this.isInScrollbackMode) {
|
|
1678
|
-
this.renderScrollbackView();
|
|
1679
|
-
}
|
|
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
|
|
1680
1689
|
}
|
|
1681
1690
|
/**
|
|
1682
1691
|
* Scroll down by a number of lines (PageDown)
|
|
1692
|
+
* Note: Scrollback disabled - see scrollUp comment
|
|
1683
1693
|
*/
|
|
1684
|
-
scrollDown(
|
|
1685
|
-
|
|
1686
|
-
this.isInScrollbackMode = this.scrollbackOffset > 0;
|
|
1687
|
-
if (this.isInScrollbackMode) {
|
|
1688
|
-
this.renderScrollbackView();
|
|
1689
|
-
}
|
|
1690
|
-
else {
|
|
1691
|
-
// Returned to live mode - force re-render
|
|
1692
|
-
this.forceRender();
|
|
1693
|
-
}
|
|
1694
|
+
scrollDown(_lines = 10) {
|
|
1695
|
+
// Scrollback disabled
|
|
1694
1696
|
}
|
|
1695
1697
|
/**
|
|
1696
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.
|
|
1697
1701
|
*/
|
|
1698
1702
|
scrollToTop() {
|
|
1699
|
-
|
|
1700
|
-
const chatBoxHeight = this.getChatBoxHeight();
|
|
1701
|
-
const visibleLines = Math.max(1, rows - chatBoxHeight);
|
|
1702
|
-
const maxOffset = Math.max(0, this.scrollbackBuffer.length - visibleLines);
|
|
1703
|
-
this.scrollbackOffset = maxOffset;
|
|
1704
|
-
this.isInScrollbackMode = true;
|
|
1705
|
-
this.renderScrollbackView();
|
|
1703
|
+
// Disabled - causes display corruption in alternate screen buffer
|
|
1706
1704
|
}
|
|
1707
1705
|
/**
|
|
1708
1706
|
* Jump to the bottom (live mode)
|
|
1707
|
+
* DISABLED: Scrollback navigation causes display corruption.
|
|
1709
1708
|
*/
|
|
1710
1709
|
scrollToBottom() {
|
|
1710
|
+
// Reset scrollback state in case it was somehow enabled
|
|
1711
1711
|
this.scrollbackOffset = 0;
|
|
1712
1712
|
this.isInScrollbackMode = false;
|
|
1713
|
-
this.forceRender();
|
|
1714
1713
|
}
|
|
1715
1714
|
/**
|
|
1716
1715
|
* Toggle scrollback mode on/off (Alt+S hotkey)
|
|
1716
|
+
* DISABLED: Scrollback navigation causes display corruption in alternate screen mode.
|
|
1717
1717
|
*/
|
|
1718
1718
|
toggleScrollbackMode() {
|
|
1719
|
-
|
|
1720
|
-
this.scrollToBottom();
|
|
1721
|
-
}
|
|
1722
|
-
else if (this.scrollbackBuffer.length > 0) {
|
|
1723
|
-
this.scrollUp(20);
|
|
1724
|
-
}
|
|
1719
|
+
// Disabled - alternate screen buffer doesn't support manual scrollback rendering
|
|
1725
1720
|
}
|
|
1726
1721
|
/**
|
|
1727
|
-
* Render the scrollback buffer view
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1730
|
-
*
|
|
1731
|
-
* - Keyboard navigation hints
|
|
1732
|
-
* - 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.
|
|
1733
1726
|
*/
|
|
1734
1727
|
renderScrollbackView() {
|
|
1735
|
-
|
|
1736
|
-
const chatBoxHeight = this.getChatBoxHeight();
|
|
1737
|
-
const contentHeight = Math.max(1, rows - chatBoxHeight);
|
|
1738
|
-
writeLock.lock('renderScrollback');
|
|
1739
|
-
try {
|
|
1740
|
-
this.write(ESC.SAVE);
|
|
1741
|
-
this.write(ESC.HIDE);
|
|
1742
|
-
// Clear content area
|
|
1743
|
-
for (let i = 1; i <= contentHeight; i++) {
|
|
1744
|
-
this.write(ESC.TO(i, 1));
|
|
1745
|
-
this.write(ESC.CLEAR_LINE);
|
|
1746
|
-
}
|
|
1747
|
-
// Calculate which lines to show
|
|
1748
|
-
const totalLines = this.scrollbackBuffer.length;
|
|
1749
|
-
const startIdx = Math.max(0, totalLines - this.scrollbackOffset - contentHeight);
|
|
1750
|
-
const endIdx = Math.max(0, totalLines - this.scrollbackOffset);
|
|
1751
|
-
const visibleLines = this.scrollbackBuffer.slice(startIdx, endIdx);
|
|
1752
|
-
// Build header bar with navigation hints
|
|
1753
|
-
const headerInfo = this.buildScrollbackHeader(cols, totalLines, startIdx, endIdx);
|
|
1754
|
-
this.write(ESC.TO(1, 1));
|
|
1755
|
-
this.write(headerInfo);
|
|
1756
|
-
// Render visible lines with line numbers and visual guides
|
|
1757
|
-
const lineNumWidth = String(totalLines).length + 1;
|
|
1758
|
-
const contentStart = 2; // Start after header
|
|
1759
|
-
for (let i = 0; i < Math.min(visibleLines.length, contentHeight - 1); i++) {
|
|
1760
|
-
const line = visibleLines[i] ?? '';
|
|
1761
|
-
const lineNum = startIdx + i + 1;
|
|
1762
|
-
this.write(ESC.TO(contentStart + i, 1));
|
|
1763
|
-
// Line number gutter
|
|
1764
|
-
const numStr = String(lineNum).padStart(lineNumWidth, ' ');
|
|
1765
|
-
this.write(theme.ui.muted(`${numStr} │ `));
|
|
1766
|
-
// Content with truncation
|
|
1767
|
-
const gutterWidth = lineNumWidth + 4;
|
|
1768
|
-
const maxLen = cols - gutterWidth - 2;
|
|
1769
|
-
const displayLine = line.length > maxLen ? line.slice(0, maxLen - 3) + '...' : line;
|
|
1770
|
-
this.write(displayLine);
|
|
1771
|
-
}
|
|
1772
|
-
// Add visual scroll track on the right edge
|
|
1773
|
-
this.renderScrollTrack(cols, contentHeight, totalLines, startIdx, endIdx);
|
|
1774
|
-
this.write(ESC.RESTORE);
|
|
1775
|
-
this.write(ESC.SHOW);
|
|
1776
|
-
}
|
|
1777
|
-
finally {
|
|
1778
|
-
writeLock.unlock();
|
|
1779
|
-
}
|
|
1780
|
-
// Re-render chat box
|
|
1781
|
-
this.forceRender();
|
|
1728
|
+
// Disabled - causes display corruption
|
|
1782
1729
|
}
|
|
1783
1730
|
/**
|
|
1784
1731
|
* Build scrollback header with navigation hints
|