erosolar-cli 1.7.194 → 1.7.196
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/core/agent.d.ts +6 -0
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +10 -1
- package/dist/core/agent.js.map +1 -1
- package/dist/core/errors/errorUtils.d.ts +87 -0
- package/dist/core/errors/errorUtils.d.ts.map +1 -0
- package/dist/core/errors/errorUtils.js +158 -0
- package/dist/core/errors/errorUtils.js.map +1 -0
- package/dist/core/resultVerification.js.map +1 -1
- package/dist/core/toolValidation.d.ts +117 -0
- package/dist/core/toolValidation.d.ts.map +1 -0
- package/dist/core/toolValidation.js +282 -0
- package/dist/core/toolValidation.js.map +1 -0
- package/dist/core/types/utilityTypes.d.ts +192 -0
- package/dist/core/types/utilityTypes.d.ts.map +1 -0
- package/dist/core/types/utilityTypes.js +272 -0
- package/dist/core/types/utilityTypes.js.map +1 -0
- package/dist/shell/interactiveShell.d.ts +9 -0
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +69 -1
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/shell/systemPrompt.d.ts.map +1 -1
- package/dist/shell/systemPrompt.js +5 -0
- package/dist/shell/systemPrompt.js.map +1 -1
- package/dist/shell/terminalInput.d.ts +1 -0
- package/dist/shell/terminalInput.d.ts.map +1 -1
- package/dist/shell/terminalInput.js +9 -2
- package/dist/shell/terminalInput.js.map +1 -1
- package/dist/shell/terminalInputAdapter.d.ts +4 -0
- package/dist/shell/terminalInputAdapter.d.ts.map +1 -1
- package/dist/shell/terminalInputAdapter.js +6 -0
- package/dist/shell/terminalInputAdapter.js.map +1 -1
- package/dist/tools/planningTools.d.ts +1 -0
- package/dist/tools/planningTools.d.ts.map +1 -1
- package/dist/tools/planningTools.js +48 -0
- package/dist/tools/planningTools.js.map +1 -1
- package/dist/ui/display.d.ts +5 -49
- package/dist/ui/display.d.ts.map +1 -1
- package/dist/ui/display.js +36 -335
- package/dist/ui/display.js.map +1 -1
- package/dist/ui/toolDisplay.d.ts.map +1 -1
- package/dist/ui/toolDisplay.js +17 -0
- package/dist/ui/toolDisplay.js.map +1 -1
- package/dist/utils/planFormatter.d.ts +34 -0
- package/dist/utils/planFormatter.d.ts.map +1 -0
- package/dist/utils/planFormatter.js +140 -0
- package/dist/utils/planFormatter.js.map +1 -0
- package/package.json +2 -2
- package/dist/shell/bracketedPasteManager.d.ts +0 -128
- package/dist/shell/bracketedPasteManager.d.ts.map +0 -1
- package/dist/shell/bracketedPasteManager.enhanced.d.ts +0 -2
- package/dist/shell/bracketedPasteManager.enhanced.d.ts.map +0 -1
- package/dist/shell/bracketedPasteManager.enhanced.js +0 -4
- package/dist/shell/bracketedPasteManager.enhanced.js.map +0 -1
- package/dist/shell/bracketedPasteManager.js +0 -372
- package/dist/shell/bracketedPasteManager.js.map +0 -1
- package/dist/shell/chatBox.d.ts +0 -228
- package/dist/shell/chatBox.d.ts.map +0 -1
- package/dist/shell/chatBox.js +0 -811
- package/dist/shell/chatBox.js.map +0 -1
- package/dist/shell/unifiedChatBox.d.ts +0 -194
- package/dist/shell/unifiedChatBox.d.ts.map +0 -1
- package/dist/shell/unifiedChatBox.js +0 -585
- package/dist/shell/unifiedChatBox.js.map +0 -1
- package/dist/ui/persistentPrompt.d.ts +0 -545
- package/dist/ui/persistentPrompt.d.ts.map +0 -1
- package/dist/ui/persistentPrompt.js +0 -1529
- package/dist/ui/persistentPrompt.js.map +0 -1
|
@@ -1,545 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PersistentPrompt - Minimal, stable chat input at bottom of terminal
|
|
3
|
-
*
|
|
4
|
-
* Design principles:
|
|
5
|
-
* - Simple: No complex cursor manipulation or multi-line rendering
|
|
6
|
-
* - Stable: Uses standard readline without fighting it
|
|
7
|
-
* - Reliable: Clear separation between output area and input area
|
|
8
|
-
*/
|
|
9
|
-
import * as readline from 'node:readline';
|
|
10
|
-
export interface PromptState {
|
|
11
|
-
userInput: string;
|
|
12
|
-
cursorPosition: number;
|
|
13
|
-
isVisible: boolean;
|
|
14
|
-
}
|
|
15
|
-
export interface StatusBarState {
|
|
16
|
-
fileChanges?: string;
|
|
17
|
-
contextUsage?: number;
|
|
18
|
-
acceptEditsEnabled?: boolean;
|
|
19
|
-
message?: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Minimal prompt manager that doesn't fight with readline
|
|
23
|
-
*/
|
|
24
|
-
export declare class PersistentPrompt {
|
|
25
|
-
private writeStream;
|
|
26
|
-
private promptText;
|
|
27
|
-
private statusBarState;
|
|
28
|
-
private isEnabled;
|
|
29
|
-
private promptState;
|
|
30
|
-
constructor(writeStream: NodeJS.WriteStream, promptText?: string);
|
|
31
|
-
/**
|
|
32
|
-
* Update the prompt text
|
|
33
|
-
*/
|
|
34
|
-
setPromptText(text: string): void;
|
|
35
|
-
/**
|
|
36
|
-
* Get the formatted prompt string
|
|
37
|
-
*/
|
|
38
|
-
getPrompt(): string;
|
|
39
|
-
/**
|
|
40
|
-
* Update user input state (for tracking only - readline handles display)
|
|
41
|
-
*/
|
|
42
|
-
updateInput(input: string, cursorPos: number): void;
|
|
43
|
-
/**
|
|
44
|
-
* Update status bar information
|
|
45
|
-
*/
|
|
46
|
-
updateStatusBar(state: Partial<StatusBarState>): void;
|
|
47
|
-
/**
|
|
48
|
-
* Show a status line above the prompt (call before readline.prompt())
|
|
49
|
-
*/
|
|
50
|
-
showStatus(): void;
|
|
51
|
-
/**
|
|
52
|
-
* Show the prompt
|
|
53
|
-
*/
|
|
54
|
-
show(): void;
|
|
55
|
-
/**
|
|
56
|
-
* Hide the prompt
|
|
57
|
-
*/
|
|
58
|
-
hide(): void;
|
|
59
|
-
/**
|
|
60
|
-
* Enable or disable
|
|
61
|
-
*/
|
|
62
|
-
setEnabled(enabled: boolean): void;
|
|
63
|
-
/**
|
|
64
|
-
* Clear - no-op for minimal implementation
|
|
65
|
-
*/
|
|
66
|
-
clear(): void;
|
|
67
|
-
/**
|
|
68
|
-
* Build status line string
|
|
69
|
-
* NOTE: Context usage is NOT shown here - it's already displayed by
|
|
70
|
-
* display.showStatusLine() which shows "Session Xm • Context Y% used • Ready for prompts"
|
|
71
|
-
*/
|
|
72
|
-
private buildStatusLine;
|
|
73
|
-
/**
|
|
74
|
-
* Handle terminal resize - no-op for minimal implementation
|
|
75
|
-
*/
|
|
76
|
-
handleResize(): void;
|
|
77
|
-
/**
|
|
78
|
-
* Dispose
|
|
79
|
-
*/
|
|
80
|
-
dispose(): void;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Simple input box that wraps readline with stable behavior
|
|
84
|
-
*/
|
|
85
|
-
export declare class SimpleInputBox {
|
|
86
|
-
private rl;
|
|
87
|
-
private promptText;
|
|
88
|
-
private statusText;
|
|
89
|
-
constructor(promptText?: string);
|
|
90
|
-
/**
|
|
91
|
-
* Initialize readline interface
|
|
92
|
-
*/
|
|
93
|
-
init(input: NodeJS.ReadStream, output: NodeJS.WriteStream): readline.Interface;
|
|
94
|
-
/**
|
|
95
|
-
* Set prompt text
|
|
96
|
-
*/
|
|
97
|
-
setPrompt(text: string): void;
|
|
98
|
-
/**
|
|
99
|
-
* Set status text (shown above prompt on next prompt())
|
|
100
|
-
*/
|
|
101
|
-
setStatus(text: string): void;
|
|
102
|
-
/**
|
|
103
|
-
* Show prompt with optional status line
|
|
104
|
-
*/
|
|
105
|
-
prompt(preserveCursor?: boolean): void;
|
|
106
|
-
/**
|
|
107
|
-
* Get readline interface
|
|
108
|
-
*/
|
|
109
|
-
getInterface(): readline.Interface | null;
|
|
110
|
-
/**
|
|
111
|
-
* Close and cleanup
|
|
112
|
-
*/
|
|
113
|
-
close(): void;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Queued command entry
|
|
117
|
-
*/
|
|
118
|
-
export interface QueuedCommand {
|
|
119
|
-
id: string;
|
|
120
|
-
text: string;
|
|
121
|
-
type: 'request' | 'continuous' | 'slash';
|
|
122
|
-
timestamp: number;
|
|
123
|
-
preview: string;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Pinned chat box state
|
|
127
|
-
*/
|
|
128
|
-
export interface PinnedChatBoxState {
|
|
129
|
-
isProcessing: boolean;
|
|
130
|
-
queuedCommands: QueuedCommand[];
|
|
131
|
-
currentInput: string;
|
|
132
|
-
contextUsage: number;
|
|
133
|
-
statusMessage: string | null;
|
|
134
|
-
isVisible: boolean;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* PinnedChatBox - Persistent input box pinned to bottom of terminal
|
|
138
|
-
*
|
|
139
|
-
* Features:
|
|
140
|
-
* - Always visible at bottom of terminal
|
|
141
|
-
* - Accepts input while AI is processing (queues commands)
|
|
142
|
-
* - Shows queue status and context usage
|
|
143
|
-
* - Non-blocking - doesn't interfere with output scroll
|
|
144
|
-
*/
|
|
145
|
-
export declare class PinnedChatBox {
|
|
146
|
-
private writeStream;
|
|
147
|
-
private state;
|
|
148
|
-
private baseReservedLines;
|
|
149
|
-
private reservedLines;
|
|
150
|
-
private _lastRenderedHeight;
|
|
151
|
-
private inputBuffer;
|
|
152
|
-
private cursorPosition;
|
|
153
|
-
private readonly maxDisplayLines;
|
|
154
|
-
private commandIdCounter;
|
|
155
|
-
private onCommandQueued?;
|
|
156
|
-
private onInputSubmit?;
|
|
157
|
-
private renderScheduled;
|
|
158
|
-
private isEnabled;
|
|
159
|
-
private isDisposed;
|
|
160
|
-
private lastRenderTime;
|
|
161
|
-
private renderThrottleMs;
|
|
162
|
-
private maxInputLength;
|
|
163
|
-
private maxQueueSize;
|
|
164
|
-
private readonly ansiPattern;
|
|
165
|
-
private readonly oscPattern;
|
|
166
|
-
private readonly maxStatusMessageLength;
|
|
167
|
-
private scrollRegionActive;
|
|
168
|
-
private inputHistory;
|
|
169
|
-
private historyIndex;
|
|
170
|
-
private tempCurrentInput;
|
|
171
|
-
private readonly maxHistorySize;
|
|
172
|
-
private isPastedBlock;
|
|
173
|
-
private pastedFullContent;
|
|
174
|
-
private lastPasteTime;
|
|
175
|
-
private readonly pasteSubmitGuardMs;
|
|
176
|
-
/** Cleanup function for output interceptor registration */
|
|
177
|
-
private outputInterceptorCleanup?;
|
|
178
|
-
private lastRenderedContent;
|
|
179
|
-
private lastRenderedCursor;
|
|
180
|
-
private lastRenderedRows;
|
|
181
|
-
private lastRenderedCols;
|
|
182
|
-
private isRendering;
|
|
183
|
-
constructor(writeStream: NodeJS.WriteStream, _promptText?: string, // Unused - readline handles input display
|
|
184
|
-
options?: {
|
|
185
|
-
onCommandQueued?: (cmd: QueuedCommand) => void;
|
|
186
|
-
onInputSubmit?: (input: string) => void;
|
|
187
|
-
maxInputLength?: number;
|
|
188
|
-
maxQueueSize?: number;
|
|
189
|
-
});
|
|
190
|
-
/** Pending render timeout for debounced afterWrite */
|
|
191
|
-
private pendingAfterWriteRender;
|
|
192
|
-
/**
|
|
193
|
-
* Register with the display's output interceptor system.
|
|
194
|
-
*
|
|
195
|
-
* With true scroll regions, output flows naturally in the scrollable area
|
|
196
|
-
* and the bottom is PROTECTED automatically - no re-rendering needed.
|
|
197
|
-
*
|
|
198
|
-
* This is a no-op now because scroll regions handle everything.
|
|
199
|
-
*/
|
|
200
|
-
registerOutputInterceptor(display: {
|
|
201
|
-
registerOutputInterceptor: (i: {
|
|
202
|
-
beforeWrite?: () => void;
|
|
203
|
-
afterWrite?: () => void;
|
|
204
|
-
}) => () => void;
|
|
205
|
-
}): void;
|
|
206
|
-
/**
|
|
207
|
-
* Enable scroll region to keep bottom lines reserved for input.
|
|
208
|
-
* Sets terminal scroll region to exclude the bottom 2 lines (separator + prompt).
|
|
209
|
-
*
|
|
210
|
-
* TRUE SCROLL REGION approach:
|
|
211
|
-
* 1. Set scroll region (rows 1 to N-2) - protects bottom 2 lines
|
|
212
|
-
* 2. Render the prompt in protected area (rows N-1 and N)
|
|
213
|
-
* 3. Leave cursor at prompt - user can type immediately
|
|
214
|
-
* 4. Output writes will go to scroll region via beforeWrite/afterWrite hooks
|
|
215
|
-
*/
|
|
216
|
-
enableScrollRegion(): void;
|
|
217
|
-
/**
|
|
218
|
-
* Disable scroll region and restore normal terminal behavior.
|
|
219
|
-
*
|
|
220
|
-
* 1. Reset scroll region to full terminal
|
|
221
|
-
* 2. Clear the reserved bottom area (will be replaced by readline prompt)
|
|
222
|
-
* 3. Move cursor to the end
|
|
223
|
-
*/
|
|
224
|
-
disableScrollRegion(): void;
|
|
225
|
-
/**
|
|
226
|
-
* Check if render is needed by comparing with last rendered state.
|
|
227
|
-
* Returns true if content, cursor, or terminal size has changed.
|
|
228
|
-
*/
|
|
229
|
-
private needsRender;
|
|
230
|
-
/**
|
|
231
|
-
* Update last rendered state after successful render.
|
|
232
|
-
*/
|
|
233
|
-
private updateRenderedState;
|
|
234
|
-
/**
|
|
235
|
-
* Reset rendered state to force next render.
|
|
236
|
-
*/
|
|
237
|
-
private invalidateRenderedState;
|
|
238
|
-
/**
|
|
239
|
-
* Render the persistent input area at the bottom of the terminal.
|
|
240
|
-
*
|
|
241
|
-
* CLEAN MULTI-LINE CHAT BOX:
|
|
242
|
-
* - Line 1: Simple separator with line count hint
|
|
243
|
-
* - Line 2+: Input lines with dark background, block cursor highlight
|
|
244
|
-
*
|
|
245
|
-
* Key features:
|
|
246
|
-
* - Dark background (ANSI 48;5;236) for entire input area
|
|
247
|
-
* - Block cursor shown via reverse video
|
|
248
|
-
* - Clean vertical layout for multi-line input
|
|
249
|
-
* - Proper cursor tracking through wrapped lines
|
|
250
|
-
*/
|
|
251
|
-
renderPersistentInput(): void;
|
|
252
|
-
/**
|
|
253
|
-
* Update the persistent input display.
|
|
254
|
-
*
|
|
255
|
-
* Always renders the input area with proper cursor tracking and background.
|
|
256
|
-
* During processing, scroll region protects the bottom area.
|
|
257
|
-
* During normal mode, this provides custom styling over readline.
|
|
258
|
-
*/
|
|
259
|
-
updatePersistentInput(): void;
|
|
260
|
-
/**
|
|
261
|
-
* Determine if we can safely render to the terminal.
|
|
262
|
-
* Protects against non-TTY streams and disposed instances.
|
|
263
|
-
*/
|
|
264
|
-
private supportsRendering;
|
|
265
|
-
/**
|
|
266
|
-
* Strip ANSI escape codes
|
|
267
|
-
*/
|
|
268
|
-
private stripAnsi;
|
|
269
|
-
/**
|
|
270
|
-
* Sanitize inline text to a single safe line (no control/ANSI codes)
|
|
271
|
-
*/
|
|
272
|
-
private sanitizeInlineText;
|
|
273
|
-
/**
|
|
274
|
-
* Sanitize multiline content for safe display (preserves newlines for counting)
|
|
275
|
-
*/
|
|
276
|
-
private sanitizeMultilineForDisplay;
|
|
277
|
-
/**
|
|
278
|
-
* Sanitize queued command text (trimmed, preserves newlines)
|
|
279
|
-
*/
|
|
280
|
-
private sanitizeCommandText;
|
|
281
|
-
/**
|
|
282
|
-
* Sanitize status message (single line, bounded length)
|
|
283
|
-
*/
|
|
284
|
-
private sanitizeStatusMessage;
|
|
285
|
-
/**
|
|
286
|
-
* Clear paste-specific state when the user edits the buffer manually.
|
|
287
|
-
* Prevents us from sending stale paste content after edits.
|
|
288
|
-
*/
|
|
289
|
-
private startManualEdit;
|
|
290
|
-
/**
|
|
291
|
-
* Apply a new buffer/cursor position and trigger downstream updates.
|
|
292
|
-
*/
|
|
293
|
-
private applyBufferChange;
|
|
294
|
-
/**
|
|
295
|
-
* Treat spaces, tabs, and newlines as whitespace for navigation helpers.
|
|
296
|
-
*/
|
|
297
|
-
private isWhitespace;
|
|
298
|
-
/**
|
|
299
|
-
* Update cursor position while keeping it in bounds and re-rendering.
|
|
300
|
-
*/
|
|
301
|
-
private setCursorPosition;
|
|
302
|
-
/**
|
|
303
|
-
* Insert multi-line content directly into the buffer (manual typing).
|
|
304
|
-
*/
|
|
305
|
-
private insertMultilineText;
|
|
306
|
-
/**
|
|
307
|
-
* Safely write to the output stream, swallowing non-fatal errors
|
|
308
|
-
*/
|
|
309
|
-
private safeWrite;
|
|
310
|
-
/**
|
|
311
|
-
* Enable or disable the pinned chat box
|
|
312
|
-
*/
|
|
313
|
-
setEnabled(enabled: boolean): void;
|
|
314
|
-
/**
|
|
315
|
-
* Set processing state
|
|
316
|
-
*
|
|
317
|
-
* TRUE SCROLL REGION approach (like Claude Code):
|
|
318
|
-
* - Enable scroll region at start (protects bottom 2-3 lines)
|
|
319
|
-
* - Output flows naturally in scroll region (cursor stays there)
|
|
320
|
-
* - Bottom area is PROTECTED - no re-rendering needed after each chunk
|
|
321
|
-
* - User types directly into protected bottom area
|
|
322
|
-
* - Disable scroll region when done
|
|
323
|
-
*/
|
|
324
|
-
setProcessing(isProcessing: boolean): void;
|
|
325
|
-
/**
|
|
326
|
-
* Update context usage percentage
|
|
327
|
-
* NOTE: This only tracks the value - it no longer triggers render since
|
|
328
|
-
* context display is handled by display.showStatusLine() instead
|
|
329
|
-
*/
|
|
330
|
-
setContextUsage(percentage: number): void;
|
|
331
|
-
/**
|
|
332
|
-
* Set status message
|
|
333
|
-
*/
|
|
334
|
-
setStatusMessage(message: string | null): void;
|
|
335
|
-
/**
|
|
336
|
-
* Queue a command for execution with overflow protection
|
|
337
|
-
*/
|
|
338
|
-
queueCommand(text: string, type?: 'request' | 'continuous' | 'slash'): QueuedCommand | null;
|
|
339
|
-
/**
|
|
340
|
-
* Remove a command from the queue
|
|
341
|
-
*/
|
|
342
|
-
dequeueCommand(): QueuedCommand | undefined;
|
|
343
|
-
/**
|
|
344
|
-
* Clear the entire queue
|
|
345
|
-
*/
|
|
346
|
-
clearQueue(): void;
|
|
347
|
-
/**
|
|
348
|
-
* Get current queue
|
|
349
|
-
*/
|
|
350
|
-
getQueue(): QueuedCommand[];
|
|
351
|
-
/**
|
|
352
|
-
* Get queue length
|
|
353
|
-
*/
|
|
354
|
-
getQueueLength(): number;
|
|
355
|
-
/**
|
|
356
|
-
* Handle character input with validation
|
|
357
|
-
* Detects multiline paste and stores full content while showing summary
|
|
358
|
-
*/
|
|
359
|
-
handleInput(char: string, options?: {
|
|
360
|
-
allowNewlines?: boolean;
|
|
361
|
-
isPaste?: boolean;
|
|
362
|
-
}): void;
|
|
363
|
-
/**
|
|
364
|
-
* Handle multiline paste - store full content and display all lines
|
|
365
|
-
*/
|
|
366
|
-
private handleMultilinePaste;
|
|
367
|
-
/**
|
|
368
|
-
* Public helper for routing external multi-line pastes directly into the chat box
|
|
369
|
-
*/
|
|
370
|
-
handlePaste(content: string): void;
|
|
371
|
-
/**
|
|
372
|
-
* Check if current input is a pasted block
|
|
373
|
-
*/
|
|
374
|
-
hasPastedBlock(): boolean;
|
|
375
|
-
/**
|
|
376
|
-
* Get the full pasted content (for submission)
|
|
377
|
-
*/
|
|
378
|
-
getPastedContent(): string;
|
|
379
|
-
/**
|
|
380
|
-
* Clear pasted block state
|
|
381
|
-
*/
|
|
382
|
-
private clearPastedBlock;
|
|
383
|
-
/**
|
|
384
|
-
* Public method to clear pasted block state (for Ctrl+C clearing)
|
|
385
|
-
*/
|
|
386
|
-
clearPastedBlockState(): void;
|
|
387
|
-
/**
|
|
388
|
-
* Get terminal dimensions and a safe width for rendering input content.
|
|
389
|
-
*/
|
|
390
|
-
private getRenderDimensions;
|
|
391
|
-
/**
|
|
392
|
-
* Wrap the current input buffer to the provided width and locate the cursor.
|
|
393
|
-
*
|
|
394
|
-
* ROBUST CURSOR TRACKING:
|
|
395
|
-
* - Uses cursorFound flag to ensure cursor is explicitly located
|
|
396
|
-
* - Falls back to direct calculation if normal tracking fails
|
|
397
|
-
* - Handles edge cases: empty input, cursor at end, cursor at newlines
|
|
398
|
-
*/
|
|
399
|
-
private wrapInputBuffer;
|
|
400
|
-
/**
|
|
401
|
-
* Convert a wrapped line/column back to an absolute cursor index.
|
|
402
|
-
*/
|
|
403
|
-
private getWrappedCursorIndex;
|
|
404
|
-
/**
|
|
405
|
-
* Calculate and update reserved lines based on current input content.
|
|
406
|
-
* Ensures multi-line content is fully visible within maxDisplayLines limit.
|
|
407
|
-
*/
|
|
408
|
-
private updateReservedLinesForContent;
|
|
409
|
-
/**
|
|
410
|
-
* Handle backspace
|
|
411
|
-
*/
|
|
412
|
-
handleBackspace(): void;
|
|
413
|
-
/**
|
|
414
|
-
* Handle delete key
|
|
415
|
-
*/
|
|
416
|
-
handleDelete(): void;
|
|
417
|
-
/**
|
|
418
|
-
* Handle cursor left
|
|
419
|
-
*/
|
|
420
|
-
handleCursorLeft(): void;
|
|
421
|
-
/**
|
|
422
|
-
* Handle cursor right
|
|
423
|
-
*/
|
|
424
|
-
handleCursorRight(): void;
|
|
425
|
-
/**
|
|
426
|
-
* Handle home key - move to start of current line (not start of buffer)
|
|
427
|
-
*/
|
|
428
|
-
handleHome(): void;
|
|
429
|
-
/**
|
|
430
|
-
* Handle end key (Ctrl+E) - move to end of current line (not end of buffer)
|
|
431
|
-
*/
|
|
432
|
-
handleEnd(): void;
|
|
433
|
-
/**
|
|
434
|
-
* Handle inserting a newline character at cursor position (Shift+Enter or Option+Enter)
|
|
435
|
-
*/
|
|
436
|
-
handleNewline(): void;
|
|
437
|
-
/**
|
|
438
|
-
* Handle up arrow - move cursor up in multi-line content, or navigate history if on first line
|
|
439
|
-
*/
|
|
440
|
-
handleHistoryUp(): void;
|
|
441
|
-
/**
|
|
442
|
-
* Handle down arrow - move cursor down in multi-line content, or navigate history if on last line
|
|
443
|
-
*/
|
|
444
|
-
handleHistoryDown(): void;
|
|
445
|
-
/**
|
|
446
|
-
* Handle Ctrl+U - delete from cursor to start of line
|
|
447
|
-
*/
|
|
448
|
-
handleDeleteToStart(): void;
|
|
449
|
-
/**
|
|
450
|
-
* Handle Ctrl+K - delete from cursor to end of line
|
|
451
|
-
*/
|
|
452
|
-
handleDeleteToEnd(): void;
|
|
453
|
-
/**
|
|
454
|
-
* Handle Ctrl+W - delete word before cursor
|
|
455
|
-
*/
|
|
456
|
-
handleDeleteWord(): void;
|
|
457
|
-
/**
|
|
458
|
-
* Handle Alt+Left - move cursor to previous word
|
|
459
|
-
*/
|
|
460
|
-
handleWordLeft(): void;
|
|
461
|
-
/**
|
|
462
|
-
* Handle Alt+Right - move cursor to next word
|
|
463
|
-
*/
|
|
464
|
-
handleWordRight(): void;
|
|
465
|
-
/**
|
|
466
|
-
* Add input to history (call after successful submit)
|
|
467
|
-
*/
|
|
468
|
-
addToHistory(input: string): void;
|
|
469
|
-
/**
|
|
470
|
-
* Handle enter/submit
|
|
471
|
-
* If there's pasted content, sends the full content (not the summary)
|
|
472
|
-
*/
|
|
473
|
-
handleSubmit(): string | null;
|
|
474
|
-
/**
|
|
475
|
-
* Clear input buffer
|
|
476
|
-
*/
|
|
477
|
-
clearInput(): void;
|
|
478
|
-
/**
|
|
479
|
-
* Set input text and optionally cursor position (for readline sync)
|
|
480
|
-
* Note: Does NOT trigger render - readline handles display during input
|
|
481
|
-
*/
|
|
482
|
-
setInput(text: string, cursorPos?: number): void;
|
|
483
|
-
/**
|
|
484
|
-
* Get current input
|
|
485
|
-
*/
|
|
486
|
-
getInput(): string;
|
|
487
|
-
/**
|
|
488
|
-
* Schedule a render on next tick (debounced and throttled)
|
|
489
|
-
*/
|
|
490
|
-
private scheduleRender;
|
|
491
|
-
/**
|
|
492
|
-
* Render the chat box with cursor tracking and background.
|
|
493
|
-
*
|
|
494
|
-
* Always uses renderPersistentInput for consistent display:
|
|
495
|
-
* - Dark background to denote user typing area
|
|
496
|
-
* - Block cursor that tracks actual cursor position
|
|
497
|
-
* - Multi-line support with proper vertical layout
|
|
498
|
-
*/
|
|
499
|
-
render(): void;
|
|
500
|
-
/**
|
|
501
|
-
* Clear the pinned area
|
|
502
|
-
*/
|
|
503
|
-
clear(): void;
|
|
504
|
-
/**
|
|
505
|
-
* Show the chat box
|
|
506
|
-
*/
|
|
507
|
-
show(): void;
|
|
508
|
-
/**
|
|
509
|
-
* Hide the chat box
|
|
510
|
-
*/
|
|
511
|
-
hide(): void;
|
|
512
|
-
/**
|
|
513
|
-
* Get current state
|
|
514
|
-
*/
|
|
515
|
-
getState(): PinnedChatBoxState;
|
|
516
|
-
/**
|
|
517
|
-
* Handle terminal resize - update scroll region if active
|
|
518
|
-
*/
|
|
519
|
-
handleResize(): void;
|
|
520
|
-
/**
|
|
521
|
-
* Get number of reserved lines at bottom
|
|
522
|
-
*/
|
|
523
|
-
getReservedLines(): number;
|
|
524
|
-
/**
|
|
525
|
-
* Get last rendered height (for layout calculations)
|
|
526
|
-
*/
|
|
527
|
-
getLastRenderedHeight(): number;
|
|
528
|
-
/**
|
|
529
|
-
* Dispose and cleanup
|
|
530
|
-
*/
|
|
531
|
-
dispose(): void;
|
|
532
|
-
/**
|
|
533
|
-
* Check if disposed
|
|
534
|
-
*/
|
|
535
|
-
isActive(): boolean;
|
|
536
|
-
/**
|
|
537
|
-
* Force immediate render (bypass throttling and deduplication)
|
|
538
|
-
*/
|
|
539
|
-
forceRender(): void;
|
|
540
|
-
/**
|
|
541
|
-
* Reset state to clean defaults
|
|
542
|
-
*/
|
|
543
|
-
reset(): void;
|
|
544
|
-
}
|
|
545
|
-
//# sourceMappingURL=persistentPrompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"persistentPrompt.d.ts","sourceRoot":"","sources":["../../src/ui/persistentPrompt.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAG1C,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,cAAc,CAAiB;IACvC,OA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