erosolar-cli 1.7.177 → 1.7.178
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 +8 -12
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/ui/FixedInputArea.d.ts +108 -0
- package/dist/ui/FixedInputArea.d.ts.map +1 -0
- package/dist/ui/FixedInputArea.js +312 -0
- package/dist/ui/FixedInputArea.js.map +1 -0
- package/dist/ui/display.d.ts +19 -0
- package/dist/ui/display.d.ts.map +1 -1
- package/dist/ui/display.js +34 -0
- package/dist/ui/display.js.map +1 -1
- package/dist/ui/persistentPrompt.d.ts.map +1 -1
- package/dist/ui/persistentPrompt.js +4 -3
- package/dist/ui/persistentPrompt.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FixedInputArea - Claude Code style chat box
|
|
3
|
+
*
|
|
4
|
+
* Simple, clean implementation that keeps the input area fixed at the bottom
|
|
5
|
+
* while output scrolls above. Uses terminal scroll regions properly.
|
|
6
|
+
*
|
|
7
|
+
* Key principles:
|
|
8
|
+
* 1. ONE scroll region - set once at start, reset once at end
|
|
9
|
+
* 2. Protected bottom area - output can never touch it
|
|
10
|
+
* 3. Cursor always at input - no jumping around
|
|
11
|
+
* 4. Minimal ANSI codes - only what's necessary
|
|
12
|
+
*/
|
|
13
|
+
export interface FixedInputAreaConfig {
|
|
14
|
+
/** Number of lines to reserve at the bottom (default: 3) */
|
|
15
|
+
reservedLines?: number;
|
|
16
|
+
/** Stream to write to (default: process.stdout) */
|
|
17
|
+
stream?: NodeJS.WriteStream;
|
|
18
|
+
}
|
|
19
|
+
export declare class FixedInputArea {
|
|
20
|
+
private readonly stream;
|
|
21
|
+
private readonly reservedLines;
|
|
22
|
+
private isActive;
|
|
23
|
+
private inputBuffer;
|
|
24
|
+
private cursorPosition;
|
|
25
|
+
private queuedCommands;
|
|
26
|
+
private statusHint;
|
|
27
|
+
constructor(config?: FixedInputAreaConfig);
|
|
28
|
+
/**
|
|
29
|
+
* Enable the fixed input area.
|
|
30
|
+
* Call this when starting AI response/streaming.
|
|
31
|
+
*/
|
|
32
|
+
enable(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Disable the fixed input area.
|
|
35
|
+
* Call this when AI response/streaming ends.
|
|
36
|
+
*/
|
|
37
|
+
disable(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Render the fixed input area at the bottom.
|
|
40
|
+
* This includes: separator line, input prompt, and status hints.
|
|
41
|
+
*/
|
|
42
|
+
renderInputArea(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Handle character input.
|
|
45
|
+
*/
|
|
46
|
+
handleInput(char: string): void;
|
|
47
|
+
/**
|
|
48
|
+
* Handle backspace.
|
|
49
|
+
*/
|
|
50
|
+
handleBackspace(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Handle delete key.
|
|
53
|
+
*/
|
|
54
|
+
handleDelete(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Handle left arrow.
|
|
57
|
+
*/
|
|
58
|
+
handleLeft(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Handle right arrow.
|
|
61
|
+
*/
|
|
62
|
+
handleRight(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Handle home key.
|
|
65
|
+
*/
|
|
66
|
+
handleHome(): void;
|
|
67
|
+
/**
|
|
68
|
+
* Handle end key.
|
|
69
|
+
*/
|
|
70
|
+
handleEnd(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Handle enter key - queue the current input.
|
|
73
|
+
*/
|
|
74
|
+
handleEnter(): string | null;
|
|
75
|
+
/**
|
|
76
|
+
* Handle clear line (Ctrl+U).
|
|
77
|
+
*/
|
|
78
|
+
handleClearLine(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Get and clear queued commands.
|
|
81
|
+
*/
|
|
82
|
+
getQueuedCommands(): string[];
|
|
83
|
+
/**
|
|
84
|
+
* Get current input buffer (for transferring to readline after disable).
|
|
85
|
+
*/
|
|
86
|
+
getInputBuffer(): string;
|
|
87
|
+
/**
|
|
88
|
+
* Set input buffer (for restoring state).
|
|
89
|
+
*/
|
|
90
|
+
setInputBuffer(value: string): void;
|
|
91
|
+
/**
|
|
92
|
+
* Set status hint to display.
|
|
93
|
+
*/
|
|
94
|
+
setStatusHint(hint: string): void;
|
|
95
|
+
/**
|
|
96
|
+
* Check if the fixed input area is active.
|
|
97
|
+
*/
|
|
98
|
+
isEnabled(): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Force a refresh of the input area.
|
|
101
|
+
* Call this after external output that might have disrupted the display.
|
|
102
|
+
*/
|
|
103
|
+
refresh(): void;
|
|
104
|
+
private write;
|
|
105
|
+
}
|
|
106
|
+
export declare function getFixedInputArea(): FixedInputArea;
|
|
107
|
+
export declare function resetFixedInputArea(): void;
|
|
108
|
+
//# sourceMappingURL=FixedInputArea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FixedInputArea.d.ts","sourceRoot":"","sources":["../../src/ui/FixedInputArea.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA6BH,MAAM,WAAW,oBAAoB;IACnC,4DAA4D;IAC5D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC;CAC7B;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IAEvC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,WAAW,CAAM;IACzB,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,UAAU,CAAM;gBAEZ,MAAM,GAAE,oBAAyB;IAK7C;;;OAGG;IACH,MAAM,IAAI,IAAI;IAkBd;;;OAGG;IACH,OAAO,IAAI,IAAI;IAmBf;;;OAGG;IACH,eAAe,IAAI,IAAI;IAqDvB;;OAEG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAa/B;;OAEG;IACH,eAAe,IAAI,IAAI;IAavB;;OAEG;IACH,YAAY,IAAI,IAAI;IAYpB;;OAEG;IACH,UAAU,IAAI,IAAI;IASlB;;OAEG;IACH,WAAW,IAAI,IAAI;IASnB;;OAEG;IACH,UAAU,IAAI,IAAI;IAOlB;;OAEG;IACH,SAAS,IAAI,IAAI;IAOjB;;OAEG;IACH,WAAW,IAAI,MAAM,GAAG,IAAI;IAgB5B;;OAEG;IACH,eAAe,IAAI,IAAI;IAQvB;;OAEG;IACH,iBAAiB,IAAI,MAAM,EAAE;IAM7B;;OAEG;IACH,cAAc,IAAI,MAAM;IAIxB;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAQnC;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAOjC;;OAEG;IACH,SAAS,IAAI,OAAO;IAIpB;;;OAGG;IACH,OAAO,IAAI,IAAI;IAMf,OAAO,CAAC,KAAK;CAOd;AAKD,wBAAgB,iBAAiB,IAAI,cAAc,CAKlD;AAED,wBAAgB,mBAAmB,IAAI,IAAI,CAK1C"}
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FixedInputArea - Claude Code style chat box
|
|
3
|
+
*
|
|
4
|
+
* Simple, clean implementation that keeps the input area fixed at the bottom
|
|
5
|
+
* while output scrolls above. Uses terminal scroll regions properly.
|
|
6
|
+
*
|
|
7
|
+
* Key principles:
|
|
8
|
+
* 1. ONE scroll region - set once at start, reset once at end
|
|
9
|
+
* 2. Protected bottom area - output can never touch it
|
|
10
|
+
* 3. Cursor always at input - no jumping around
|
|
11
|
+
* 4. Minimal ANSI codes - only what's necessary
|
|
12
|
+
*/
|
|
13
|
+
// ANSI escape codes
|
|
14
|
+
const ESC = '\x1b';
|
|
15
|
+
const CSI = `${ESC}[`;
|
|
16
|
+
const ANSI = {
|
|
17
|
+
// Scroll region: set scrollable area from line `top` to line `bottom`
|
|
18
|
+
setScrollRegion: (top, bottom) => `${CSI}${top};${bottom}r`,
|
|
19
|
+
// Reset scroll region to full screen
|
|
20
|
+
resetScrollRegion: () => `${CSI}r`,
|
|
21
|
+
// Move cursor to specific row and column (1-indexed)
|
|
22
|
+
moveTo: (row, col) => `${CSI}${row};${col}H`,
|
|
23
|
+
// Move cursor to column (1-indexed)
|
|
24
|
+
moveToCol: (col) => `${CSI}${col}G`,
|
|
25
|
+
// Clear from cursor to end of line
|
|
26
|
+
clearToEndOfLine: () => `${CSI}K`,
|
|
27
|
+
// Clear entire line
|
|
28
|
+
clearLine: () => `${CSI}2K`,
|
|
29
|
+
// Save cursor position
|
|
30
|
+
saveCursor: () => `${ESC}7`,
|
|
31
|
+
// Restore cursor position
|
|
32
|
+
restoreCursor: () => `${ESC}8`,
|
|
33
|
+
// Hide cursor
|
|
34
|
+
hideCursor: () => `${CSI}?25l`,
|
|
35
|
+
// Show cursor
|
|
36
|
+
showCursor: () => `${CSI}?25h`,
|
|
37
|
+
};
|
|
38
|
+
export class FixedInputArea {
|
|
39
|
+
stream;
|
|
40
|
+
reservedLines;
|
|
41
|
+
isActive = false;
|
|
42
|
+
inputBuffer = '';
|
|
43
|
+
cursorPosition = 0;
|
|
44
|
+
queuedCommands = [];
|
|
45
|
+
statusHint = '';
|
|
46
|
+
constructor(config = {}) {
|
|
47
|
+
this.stream = config.stream ?? process.stdout;
|
|
48
|
+
this.reservedLines = config.reservedLines ?? 3;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Enable the fixed input area.
|
|
52
|
+
* Call this when starting AI response/streaming.
|
|
53
|
+
*/
|
|
54
|
+
enable() {
|
|
55
|
+
if (this.isActive || !this.stream.isTTY)
|
|
56
|
+
return;
|
|
57
|
+
const rows = this.stream.rows ?? 24;
|
|
58
|
+
const scrollBottom = rows - this.reservedLines;
|
|
59
|
+
// Set scroll region to exclude the bottom reserved lines
|
|
60
|
+
this.write(ANSI.setScrollRegion(1, scrollBottom));
|
|
61
|
+
// Move cursor to bottom of scroll region (where output will flow)
|
|
62
|
+
this.write(ANSI.moveTo(scrollBottom, 1));
|
|
63
|
+
// Render the fixed input area at the bottom
|
|
64
|
+
this.renderInputArea();
|
|
65
|
+
this.isActive = true;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Disable the fixed input area.
|
|
69
|
+
* Call this when AI response/streaming ends.
|
|
70
|
+
*/
|
|
71
|
+
disable() {
|
|
72
|
+
if (!this.isActive)
|
|
73
|
+
return;
|
|
74
|
+
// Reset scroll region to full screen
|
|
75
|
+
this.write(ANSI.resetScrollRegion());
|
|
76
|
+
// Clear the reserved area (it will be replaced by normal prompt)
|
|
77
|
+
const rows = this.stream.rows ?? 24;
|
|
78
|
+
for (let i = 0; i < this.reservedLines; i++) {
|
|
79
|
+
this.write(ANSI.moveTo(rows - i, 1));
|
|
80
|
+
this.write(ANSI.clearLine());
|
|
81
|
+
}
|
|
82
|
+
// Move cursor to the bottom
|
|
83
|
+
this.write(ANSI.moveTo(rows, 1));
|
|
84
|
+
this.isActive = false;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Render the fixed input area at the bottom.
|
|
88
|
+
* This includes: separator line, input prompt, and status hints.
|
|
89
|
+
*/
|
|
90
|
+
renderInputArea() {
|
|
91
|
+
if (!this.stream.isTTY)
|
|
92
|
+
return;
|
|
93
|
+
const rows = this.stream.rows ?? 24;
|
|
94
|
+
const cols = this.stream.columns ?? 80;
|
|
95
|
+
// Save cursor position (we're in the scroll region)
|
|
96
|
+
this.write(ANSI.saveCursor());
|
|
97
|
+
// Line 1 of reserved area: Separator
|
|
98
|
+
const separatorRow = rows - this.reservedLines + 1;
|
|
99
|
+
this.write(ANSI.moveTo(separatorRow, 1));
|
|
100
|
+
this.write(ANSI.clearLine());
|
|
101
|
+
const separatorWidth = Math.min(cols - 2, 60);
|
|
102
|
+
this.write('─'.repeat(separatorWidth));
|
|
103
|
+
// Line 2 of reserved area: Input prompt
|
|
104
|
+
const inputRow = separatorRow + 1;
|
|
105
|
+
this.write(ANSI.moveTo(inputRow, 1));
|
|
106
|
+
this.write(ANSI.clearLine());
|
|
107
|
+
this.write('> ');
|
|
108
|
+
// Display input buffer (truncate if too long)
|
|
109
|
+
const maxInputWidth = cols - 4;
|
|
110
|
+
let displayInput = this.inputBuffer;
|
|
111
|
+
if (displayInput.length > maxInputWidth) {
|
|
112
|
+
displayInput = '…' + displayInput.slice(-(maxInputWidth - 1));
|
|
113
|
+
}
|
|
114
|
+
this.write(displayInput);
|
|
115
|
+
// Line 3 of reserved area: Status hints
|
|
116
|
+
const statusRow = inputRow + 1;
|
|
117
|
+
this.write(ANSI.moveTo(statusRow, 1));
|
|
118
|
+
this.write(ANSI.clearLine());
|
|
119
|
+
// Build status line
|
|
120
|
+
const hints = [];
|
|
121
|
+
if (this.queuedCommands.length > 0) {
|
|
122
|
+
hints.push(`${this.queuedCommands.length} queued`);
|
|
123
|
+
}
|
|
124
|
+
hints.push('Esc: cancel', 'Enter: queue');
|
|
125
|
+
if (this.statusHint) {
|
|
126
|
+
hints.unshift(this.statusHint);
|
|
127
|
+
}
|
|
128
|
+
this.write(` ${hints.join(' · ')}`);
|
|
129
|
+
// Position cursor at the input (after "> " and the input text)
|
|
130
|
+
const cursorCol = 3 + Math.min(this.cursorPosition, displayInput.length);
|
|
131
|
+
this.write(ANSI.moveTo(inputRow, cursorCol));
|
|
132
|
+
// Note: We do NOT restore cursor here - we WANT the cursor to stay at the input
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Handle character input.
|
|
136
|
+
*/
|
|
137
|
+
handleInput(char) {
|
|
138
|
+
// Insert character at cursor position
|
|
139
|
+
this.inputBuffer =
|
|
140
|
+
this.inputBuffer.slice(0, this.cursorPosition) +
|
|
141
|
+
char +
|
|
142
|
+
this.inputBuffer.slice(this.cursorPosition);
|
|
143
|
+
this.cursorPosition += char.length;
|
|
144
|
+
if (this.isActive) {
|
|
145
|
+
this.renderInputArea();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Handle backspace.
|
|
150
|
+
*/
|
|
151
|
+
handleBackspace() {
|
|
152
|
+
if (this.cursorPosition > 0) {
|
|
153
|
+
this.inputBuffer =
|
|
154
|
+
this.inputBuffer.slice(0, this.cursorPosition - 1) +
|
|
155
|
+
this.inputBuffer.slice(this.cursorPosition);
|
|
156
|
+
this.cursorPosition--;
|
|
157
|
+
if (this.isActive) {
|
|
158
|
+
this.renderInputArea();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Handle delete key.
|
|
164
|
+
*/
|
|
165
|
+
handleDelete() {
|
|
166
|
+
if (this.cursorPosition < this.inputBuffer.length) {
|
|
167
|
+
this.inputBuffer =
|
|
168
|
+
this.inputBuffer.slice(0, this.cursorPosition) +
|
|
169
|
+
this.inputBuffer.slice(this.cursorPosition + 1);
|
|
170
|
+
if (this.isActive) {
|
|
171
|
+
this.renderInputArea();
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Handle left arrow.
|
|
177
|
+
*/
|
|
178
|
+
handleLeft() {
|
|
179
|
+
if (this.cursorPosition > 0) {
|
|
180
|
+
this.cursorPosition--;
|
|
181
|
+
if (this.isActive) {
|
|
182
|
+
this.renderInputArea();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Handle right arrow.
|
|
188
|
+
*/
|
|
189
|
+
handleRight() {
|
|
190
|
+
if (this.cursorPosition < this.inputBuffer.length) {
|
|
191
|
+
this.cursorPosition++;
|
|
192
|
+
if (this.isActive) {
|
|
193
|
+
this.renderInputArea();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Handle home key.
|
|
199
|
+
*/
|
|
200
|
+
handleHome() {
|
|
201
|
+
this.cursorPosition = 0;
|
|
202
|
+
if (this.isActive) {
|
|
203
|
+
this.renderInputArea();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Handle end key.
|
|
208
|
+
*/
|
|
209
|
+
handleEnd() {
|
|
210
|
+
this.cursorPosition = this.inputBuffer.length;
|
|
211
|
+
if (this.isActive) {
|
|
212
|
+
this.renderInputArea();
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Handle enter key - queue the current input.
|
|
217
|
+
*/
|
|
218
|
+
handleEnter() {
|
|
219
|
+
const input = this.inputBuffer.trim();
|
|
220
|
+
if (input) {
|
|
221
|
+
this.queuedCommands.push(input);
|
|
222
|
+
this.inputBuffer = '';
|
|
223
|
+
this.cursorPosition = 0;
|
|
224
|
+
if (this.isActive) {
|
|
225
|
+
this.renderInputArea();
|
|
226
|
+
}
|
|
227
|
+
return input;
|
|
228
|
+
}
|
|
229
|
+
return null;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Handle clear line (Ctrl+U).
|
|
233
|
+
*/
|
|
234
|
+
handleClearLine() {
|
|
235
|
+
this.inputBuffer = '';
|
|
236
|
+
this.cursorPosition = 0;
|
|
237
|
+
if (this.isActive) {
|
|
238
|
+
this.renderInputArea();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Get and clear queued commands.
|
|
243
|
+
*/
|
|
244
|
+
getQueuedCommands() {
|
|
245
|
+
const commands = this.queuedCommands;
|
|
246
|
+
this.queuedCommands = [];
|
|
247
|
+
return commands;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Get current input buffer (for transferring to readline after disable).
|
|
251
|
+
*/
|
|
252
|
+
getInputBuffer() {
|
|
253
|
+
return this.inputBuffer;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Set input buffer (for restoring state).
|
|
257
|
+
*/
|
|
258
|
+
setInputBuffer(value) {
|
|
259
|
+
this.inputBuffer = value;
|
|
260
|
+
this.cursorPosition = value.length;
|
|
261
|
+
if (this.isActive) {
|
|
262
|
+
this.renderInputArea();
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Set status hint to display.
|
|
267
|
+
*/
|
|
268
|
+
setStatusHint(hint) {
|
|
269
|
+
this.statusHint = hint;
|
|
270
|
+
if (this.isActive) {
|
|
271
|
+
this.renderInputArea();
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Check if the fixed input area is active.
|
|
276
|
+
*/
|
|
277
|
+
isEnabled() {
|
|
278
|
+
return this.isActive;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Force a refresh of the input area.
|
|
282
|
+
* Call this after external output that might have disrupted the display.
|
|
283
|
+
*/
|
|
284
|
+
refresh() {
|
|
285
|
+
if (this.isActive) {
|
|
286
|
+
this.renderInputArea();
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
write(data) {
|
|
290
|
+
try {
|
|
291
|
+
this.stream.write(data);
|
|
292
|
+
}
|
|
293
|
+
catch {
|
|
294
|
+
// Ignore write errors
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
// Singleton instance
|
|
299
|
+
let instance = null;
|
|
300
|
+
export function getFixedInputArea() {
|
|
301
|
+
if (!instance) {
|
|
302
|
+
instance = new FixedInputArea();
|
|
303
|
+
}
|
|
304
|
+
return instance;
|
|
305
|
+
}
|
|
306
|
+
export function resetFixedInputArea() {
|
|
307
|
+
if (instance?.isEnabled()) {
|
|
308
|
+
instance.disable();
|
|
309
|
+
}
|
|
310
|
+
instance = null;
|
|
311
|
+
}
|
|
312
|
+
//# sourceMappingURL=FixedInput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AI,CAAC,CAAC;QAC1B,CAAC;QAAC,MAAM,CAAC;YACP,sBAAsB;QACxB,CAAC;IACH,CAAC;CACF;AAED,qBAAqB;AACrB,IAAI,QAAQ,GAA0B,IAAI,CAAC;AAE3C,MAAM,UAAU,iBAAiB;IAC/B,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC;IAClC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,IAAI,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC;QAC1B,QAAQ,CAAC,OAAO,EAAE,CAAC;IACrB,CAAC;IACD,QAAQ,GAAG,IAAI,CAAC;AAClB,CAAC"}
|
package/dist/ui/display.d.ts
CHANGED
|
@@ -67,6 +67,25 @@ export declare class Display {
|
|
|
67
67
|
private notifyAfterOutput;
|
|
68
68
|
private write;
|
|
69
69
|
private writeLine;
|
|
70
|
+
/**
|
|
71
|
+
* Write raw content directly to output stream.
|
|
72
|
+
* Goes through interceptors and output lock so overlays refresh safely.
|
|
73
|
+
* Use this for streaming output chunks.
|
|
74
|
+
*/
|
|
75
|
+
writeRaw(content: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* Stream chunk helper (alias for writeRaw).
|
|
78
|
+
*/
|
|
79
|
+
stream(chunk: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* Backward-compatible alias for stream().
|
|
82
|
+
*/
|
|
83
|
+
writeStreamChunk(chunk: string): void;
|
|
84
|
+
/**
|
|
85
|
+
* Get the output stream for direct access.
|
|
86
|
+
* Prefer writeRaw/writeStreamChunk for interceptor support.
|
|
87
|
+
*/
|
|
88
|
+
getOutputStream(): OutputStream;
|
|
70
89
|
private getColumnWidth;
|
|
71
90
|
private bannerState;
|
|
72
91
|
/**
|
package/dist/ui/display.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../src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;;;OAIG;IAEH,OAAO,CAAC,iBAAiB;IAmBzB,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,mBAAmB;IAkB3B,OAAO,CAAC,oBAAoB;IAoB5B,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,sBAAsB;IAgE9B;;OAEG;IACH,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,WAAW;IAkBnB,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,OAAO;IASf;;;OAGG;IACH,OAAO,CAAC,eAAe;IAuCvB,OAAO,CAAC,mBAAmB;IAoB3B,OAAO,CAAC,iBAAiB;IASzB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAyCtB,OAAO,CAAC,kBAAkB;IAe1B,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,uBAAuB;IAoC/B;;OAEG;IACH,iBAAiB,CAAC,OAAO,EAAE,MAAM;IAajC,OAAO,CAAC,sBAAsB;IAgB9B;;;OAGG;IACH,OAAO,CAAC,QAAQ;IA6ChB;;;OAGG;IACH,OAAO,CAAC,aAAa;IA4BrB;;;OAGG;IACH,OAAO,CAAC,SAAS;IAajB;;OAEG;IACH,OAAO,CAAC,SAAS;IAOjB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAiBvB;;OAEG;IACH,OAAO,CAAC,aAAa;IAOrB;;;OAGG;IACH,OAAO,CAAC,SAAS;CAMlB;AAED,eAAO,MAAM,OAAO,SAAgB,CAAC"}
|
package/dist/ui/display.js
CHANGED
|
@@ -238,6 +238,40 @@ export class Display {
|
|
|
238
238
|
writeLine(value = '', target = this.outputStream) {
|
|
239
239
|
this.write(`${value}\n`, target);
|
|
240
240
|
}
|
|
241
|
+
/**
|
|
242
|
+
* Write raw content directly to output stream.
|
|
243
|
+
* Goes through interceptors and output lock so overlays refresh safely.
|
|
244
|
+
* Use this for streaming output chunks.
|
|
245
|
+
*/
|
|
246
|
+
writeRaw(content) {
|
|
247
|
+
if (typeof content !== 'string') {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
this.outputLock.safeWrite(() => {
|
|
251
|
+
this.withOutput(() => {
|
|
252
|
+
this.write(content);
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Stream chunk helper (alias for writeRaw).
|
|
258
|
+
*/
|
|
259
|
+
stream(chunk) {
|
|
260
|
+
this.writeRaw(chunk);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Backward-compatible alias for stream().
|
|
264
|
+
*/
|
|
265
|
+
writeStreamChunk(chunk) {
|
|
266
|
+
this.stream(chunk);
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Get the output stream for direct access.
|
|
270
|
+
* Prefer writeRaw/writeStreamChunk for interceptor support.
|
|
271
|
+
*/
|
|
272
|
+
getOutputStream() {
|
|
273
|
+
return this.outputStream;
|
|
274
|
+
}
|
|
241
275
|
getColumnWidth() {
|
|
242
276
|
if (typeof this.outputStream.columns === 'number' &&
|
|
243
277
|
Number.isFinite(this.outputStream.columns) &&
|