pi2dsh 0.2.0

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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +122 -0
  3. package/README.zh.md +122 -0
  4. package/dist/cli.d.mts +2 -0
  5. package/dist/cli.mjs +128 -0
  6. package/dist/cli.mjs.map +1 -0
  7. package/dist/compat/pi-ai.d.mts +2597 -0
  8. package/dist/compat/pi-ai.d.mts.map +1 -0
  9. package/dist/compat/pi-ai.mjs +4669 -0
  10. package/dist/compat/pi-ai.mjs.map +1 -0
  11. package/dist/compat/pi-coding-agent.d.mts +745 -0
  12. package/dist/compat/pi-coding-agent.d.mts.map +1 -0
  13. package/dist/compat/pi-coding-agent.mjs +4 -0
  14. package/dist/compat/pi-tui.d.mts +3 -0
  15. package/dist/compat/pi-tui.mjs +3622 -0
  16. package/dist/compat/pi-tui.mjs.map +1 -0
  17. package/dist/host.d.mts +35 -0
  18. package/dist/host.d.mts.map +1 -0
  19. package/dist/host.mjs +197 -0
  20. package/dist/host.mjs.map +1 -0
  21. package/dist/index.d.mts +69 -0
  22. package/dist/index.d.mts.map +1 -0
  23. package/dist/index.mjs +5 -0
  24. package/dist/mcp-config-jL9w70It.mjs +1535 -0
  25. package/dist/mcp-config-jL9w70It.mjs.map +1 -0
  26. package/dist/pi-coding-agent-Dsg6_0ua.mjs +2060 -0
  27. package/dist/pi-coding-agent-Dsg6_0ua.mjs.map +1 -0
  28. package/dist/pi-config-shim-CZ1wFzqM.mjs +27 -0
  29. package/dist/pi-config-shim-CZ1wFzqM.mjs.map +1 -0
  30. package/dist/pi-tui-iHoF2tFc.d.mts +1043 -0
  31. package/dist/pi-tui-iHoF2tFc.d.mts.map +1 -0
  32. package/dist/pi-tui-utils-CcaVtm-3.mjs +895 -0
  33. package/dist/pi-tui-utils-CcaVtm-3.mjs.map +1 -0
  34. package/dist/pi-types-KazmR2O5.d.mts +62 -0
  35. package/dist/pi-types-KazmR2O5.d.mts.map +1 -0
  36. package/dist/pi-uuid-Db8ShZsK.mjs +47 -0
  37. package/dist/pi-uuid-Db8ShZsK.mjs.map +1 -0
  38. package/dist/rolldown-runtime-C2Q2p085.mjs +15 -0
  39. package/dist/runtime-D84Hv_3m.mjs +1499 -0
  40. package/dist/runtime-D84Hv_3m.mjs.map +1 -0
  41. package/dist/runtime.d.mts +31 -0
  42. package/dist/runtime.d.mts.map +1 -0
  43. package/dist/runtime.mjs +3 -0
  44. package/dist/source-D7Ir-rPT.mjs +154 -0
  45. package/dist/source-D7Ir-rPT.mjs.map +1 -0
  46. package/dist/types-7IWJPPvS.d.mts +59 -0
  47. package/dist/types-7IWJPPvS.d.mts.map +1 -0
  48. package/package.json +135 -0
@@ -0,0 +1,1043 @@
1
+
2
+ import { Marked, Token, Tokens } from "marked";
3
+ //#region src/compat/vendor/pi-tui-utils.d.ts
4
+ /**
5
+ * Get the shared grapheme segmenter instance.
6
+ */
7
+ declare function getGraphemeSegmenter(): Intl.Segmenter;
8
+ /**
9
+ * Get the shared word segmenter instance.
10
+ */
11
+ declare function getWordSegmenter(): Intl.Segmenter;
12
+ declare const cjkBreakRegex: RegExp;
13
+ /**
14
+ * Calculate the visible width of a string in terminal columns.
15
+ */
16
+ declare function visibleWidth(str: string): number;
17
+ /** Remove ANSI, OSC, and APC control sequences while preserving visible text. */
18
+ declare function stripTerminalSequences(str: string): string;
19
+ interface GraphemeCellRange {
20
+ start: number;
21
+ end: number;
22
+ }
23
+ /** Return the terminal-cell range occupied by the grapheme at a visible column. */
24
+ declare function getGraphemeCellRange(line: string, column: number): GraphemeCellRange | undefined;
25
+ /** Return the OSC 8 hyperlink covering a visible terminal column. */
26
+ declare function getOsc8LinkAtColumn(line: string, column: number): string | undefined;
27
+ declare function normalizeTerminalOutput(str: string): string;
28
+ /**
29
+ * Extract ANSI escape sequences from a string at the given position.
30
+ */
31
+ declare function extractAnsiCode(str: string, pos: number): {
32
+ code: string;
33
+ length: number;
34
+ } | null;
35
+ /**
36
+ * Wrap text with ANSI codes preserved.
37
+ *
38
+ * ONLY does word wrapping - NO padding, NO background colors.
39
+ * Returns lines where each line is <= width visible chars.
40
+ * Active ANSI codes are preserved across line breaks.
41
+ *
42
+ * @param text - Text to wrap (may contain ANSI codes and newlines)
43
+ * @param width - Maximum visible width per line
44
+ * @returns Array of wrapped lines (NOT padded to width)
45
+ */
46
+ declare function wrapTextWithAnsi(text: string, width: number): string[];
47
+ declare const PUNCTUATION_REGEX: RegExp;
48
+ /**
49
+ * Check if a character is whitespace.
50
+ */
51
+ declare function isWhitespaceChar(char: string): boolean;
52
+ /**
53
+ * Check if a character is punctuation.
54
+ */
55
+ declare function isPunctuationChar(char: string): boolean;
56
+ /**
57
+ * Apply background color to a line, padding to full width.
58
+ *
59
+ * @param line - Line of text (may contain ANSI codes)
60
+ * @param width - Total width to pad to
61
+ * @param bgFn - Background color function
62
+ * @returns Line with background applied and padded to width
63
+ */
64
+ declare function applyBackgroundToLine(line: string, width: number, bgFn: (text: string) => string): string;
65
+ /**
66
+ * Truncate text to fit within a maximum visible width, adding ellipsis if needed.
67
+ * Optionally pad with spaces to reach exactly maxWidth.
68
+ * Properly handles ANSI escape codes (they don't count toward width).
69
+ *
70
+ * @param text - Text to truncate (may contain ANSI codes)
71
+ * @param maxWidth - Maximum visible width
72
+ * @param ellipsis - Ellipsis string to append when truncating (default: "...")
73
+ * @param pad - If true, pad result with spaces to exactly maxWidth (default: false)
74
+ * @returns Truncated text, optionally padded to exactly maxWidth
75
+ */
76
+ declare function truncateToWidth(text: string, maxWidth: number, ellipsis?: string, pad?: boolean): string;
77
+ /**
78
+ * Extract a range of visible columns from a line. Handles ANSI codes and wide chars.
79
+ * @param strict - If true, exclude wide chars at boundary that would extend past the range
80
+ */
81
+ declare function sliceByColumn(line: string, startCol: number, length: number, strict?: boolean): string;
82
+ /** Like sliceByColumn but also returns the actual visible width of the result. */
83
+ declare function sliceWithWidth(line: string, startCol: number, length: number, strict?: boolean): {
84
+ text: string;
85
+ width: number;
86
+ };
87
+ //#endregion
88
+ //#region src/compat/vendor/pi-tui-fuzzy.d.ts
89
+ /**
90
+ * Fuzzy matching utilities.
91
+ * Matches if all query characters appear in order (not necessarily consecutive).
92
+ * Lower score = better match.
93
+ */
94
+ interface FuzzyMatch {
95
+ matches: boolean;
96
+ score: number;
97
+ }
98
+ declare function fuzzyMatch(query: string, text: string): FuzzyMatch;
99
+ /**
100
+ * Filter and sort items by fuzzy match quality (best matches first).
101
+ * Supports whitespace- and slash-separated tokens: all tokens must match.
102
+ */
103
+ declare function fuzzyFilter<T>(items: T[], query: string, getText: (item: T) => string): T[];
104
+ //#endregion
105
+ //#region src/compat/vendor/pi-tui-keys.d.ts
106
+ /**
107
+ * Keyboard input handling for terminal applications.
108
+ *
109
+ * Supports both legacy terminal sequences and Kitty keyboard protocol.
110
+ * See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
111
+ * Reference: https://github.com/sst/opentui/blob/7da92b4088aebfe27b9f691c04163a48821e49fd/packages/core/src/lib/parse.keypress.ts
112
+ *
113
+ * Symbol keys are also supported, however some ctrl+symbol combos
114
+ * overlap with ASCII codes, e.g. ctrl+[ = ESC.
115
+ * See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#legacy-ctrl-mapping-of-ascii-keys
116
+ * Those can still be * used for ctrl+shift combos
117
+ *
118
+ * API:
119
+ * - matchesKey(data, keyId) - Check if input matches a key identifier
120
+ * - parseKey(data) - Parse input and return the key identifier
121
+ * - Key - Helper object for creating typed key identifiers
122
+ * - setKittyProtocolActive(active) - Set global Kitty protocol state
123
+ * - isKittyProtocolActive() - Query global Kitty protocol state
124
+ */
125
+ /**
126
+ * Set the global Kitty keyboard protocol state.
127
+ * Called by ProcessTerminal after detecting protocol support.
128
+ */
129
+ declare function setKittyProtocolActive(active: boolean): void;
130
+ /**
131
+ * Query whether Kitty keyboard protocol is currently active.
132
+ */
133
+ declare function isKittyProtocolActive(): boolean;
134
+ type Letter = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
135
+ type Digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
136
+ type SymbolKey = "`" | "-" | "=" | "[" | "]" | "\\" | ";" | "'" | "," | "." | "/" | "!" | "@" | "#" | "$" | "%" | "^" | "&" | "*" | "(" | ")" | "_" | "+" | "|" | "~" | "{" | "}" | ":" | "<" | ">" | "?";
137
+ type SpecialKey = "escape" | "esc" | "enter" | "return" | "tab" | "space" | "backspace" | "delete" | "insert" | "clear" | "home" | "end" | "pageUp" | "pageDown" | "up" | "down" | "left" | "right" | "f1" | "f2" | "f3" | "f4" | "f5" | "f6" | "f7" | "f8" | "f9" | "f10" | "f11" | "f12";
138
+ type BaseKey = Letter | Digit | SymbolKey | SpecialKey;
139
+ type ModifierName = "ctrl" | "shift" | "alt" | "super";
140
+ type ModifiedKeyId<Key extends string, RemainingModifiers extends ModifierName = ModifierName> = { [M in RemainingModifiers]: `${M}+${Key}` | `${M}+${ModifiedKeyId<Key, Exclude<RemainingModifiers, M>>}`; }[RemainingModifiers];
141
+ /**
142
+ * Union type of all valid key identifiers.
143
+ * Provides autocomplete and catches typos at compile time.
144
+ */
145
+ type KeyId = BaseKey | ModifiedKeyId<BaseKey>;
146
+ /**
147
+ * Helper object for creating typed key identifiers with autocomplete.
148
+ *
149
+ * Usage:
150
+ * - Key.escape, Key.enter, Key.tab, etc. for special keys
151
+ * - Key.backtick, Key.comma, Key.period, etc. for symbol keys
152
+ * - Key.ctrl("c"), Key.alt("x"), Key.super("k") for single modifiers
153
+ * - Key.ctrlShift("p"), Key.ctrlAlt("x"), Key.ctrlSuper("k") for combined modifiers
154
+ */
155
+ declare const Key: {
156
+ readonly escape: "escape";
157
+ readonly esc: "esc";
158
+ readonly enter: "enter";
159
+ readonly return: "return";
160
+ readonly tab: "tab";
161
+ readonly space: "space";
162
+ readonly backspace: "backspace";
163
+ readonly delete: "delete";
164
+ readonly insert: "insert";
165
+ readonly clear: "clear";
166
+ readonly home: "home";
167
+ readonly end: "end";
168
+ readonly pageUp: "pageUp";
169
+ readonly pageDown: "pageDown";
170
+ readonly up: "up";
171
+ readonly down: "down";
172
+ readonly left: "left";
173
+ readonly right: "right";
174
+ readonly f1: "f1";
175
+ readonly f2: "f2";
176
+ readonly f3: "f3";
177
+ readonly f4: "f4";
178
+ readonly f5: "f5";
179
+ readonly f6: "f6";
180
+ readonly f7: "f7";
181
+ readonly f8: "f8";
182
+ readonly f9: "f9";
183
+ readonly f10: "f10";
184
+ readonly f11: "f11";
185
+ readonly f12: "f12";
186
+ readonly backtick: "`";
187
+ readonly hyphen: "-";
188
+ readonly equals: "=";
189
+ readonly leftbracket: "[";
190
+ readonly rightbracket: "]";
191
+ readonly backslash: "\\";
192
+ readonly semicolon: ";";
193
+ readonly quote: "'";
194
+ readonly comma: ",";
195
+ readonly period: ".";
196
+ readonly slash: "/";
197
+ readonly exclamation: "!";
198
+ readonly at: "@";
199
+ readonly hash: "#";
200
+ readonly dollar: "$";
201
+ readonly percent: "%";
202
+ readonly caret: "^";
203
+ readonly ampersand: "&";
204
+ readonly asterisk: "*";
205
+ readonly leftparen: "(";
206
+ readonly rightparen: ")";
207
+ readonly underscore: "_";
208
+ readonly plus: "+";
209
+ readonly pipe: "|";
210
+ readonly tilde: "~";
211
+ readonly leftbrace: "{";
212
+ readonly rightbrace: "}";
213
+ readonly colon: ":";
214
+ readonly lessthan: "<";
215
+ readonly greaterthan: ">";
216
+ readonly question: "?";
217
+ readonly ctrl: <K extends BaseKey>(key: K) => `ctrl+${K}`;
218
+ readonly shift: <K extends BaseKey>(key: K) => `shift+${K}`;
219
+ readonly alt: <K extends BaseKey>(key: K) => `alt+${K}`;
220
+ readonly super: <K extends BaseKey>(key: K) => `super+${K}`;
221
+ readonly ctrlShift: <K extends BaseKey>(key: K) => `ctrl+shift+${K}`;
222
+ readonly shiftCtrl: <K extends BaseKey>(key: K) => `shift+ctrl+${K}`;
223
+ readonly ctrlAlt: <K extends BaseKey>(key: K) => `ctrl+alt+${K}`;
224
+ readonly altCtrl: <K extends BaseKey>(key: K) => `alt+ctrl+${K}`;
225
+ readonly shiftAlt: <K extends BaseKey>(key: K) => `shift+alt+${K}`;
226
+ readonly altShift: <K extends BaseKey>(key: K) => `alt+shift+${K}`;
227
+ readonly ctrlSuper: <K extends BaseKey>(key: K) => `ctrl+super+${K}`;
228
+ readonly superCtrl: <K extends BaseKey>(key: K) => `super+ctrl+${K}`;
229
+ readonly shiftSuper: <K extends BaseKey>(key: K) => `shift+super+${K}`;
230
+ readonly superShift: <K extends BaseKey>(key: K) => `super+shift+${K}`;
231
+ readonly altSuper: <K extends BaseKey>(key: K) => `alt+super+${K}`;
232
+ readonly superAlt: <K extends BaseKey>(key: K) => `super+alt+${K}`;
233
+ readonly ctrlShiftAlt: <K extends BaseKey>(key: K) => `ctrl+shift+alt+${K}`;
234
+ readonly ctrlShiftSuper: <K extends BaseKey>(key: K) => `ctrl+shift+super+${K}`;
235
+ };
236
+ /**
237
+ * Event types from Kitty keyboard protocol (flag 2)
238
+ * 1 = key press, 2 = key repeat, 3 = key release
239
+ */
240
+ type KeyEventType = "press" | "repeat" | "release";
241
+ /**
242
+ * Check if the last parsed key event was a key release.
243
+ * Only meaningful when Kitty keyboard protocol with flag 2 is active.
244
+ */
245
+ declare function isKeyRelease(data: string): boolean;
246
+ /**
247
+ * Check if the last parsed key event was a key repeat.
248
+ * Only meaningful when Kitty keyboard protocol with flag 2 is active.
249
+ */
250
+ declare function isKeyRepeat(data: string): boolean;
251
+ /**
252
+ * Match input data against a key identifier string.
253
+ *
254
+ * Supported key identifiers:
255
+ * - Single keys: "escape", "tab", "enter", "backspace", "delete", "home", "end", "space"
256
+ * - Arrow keys: "up", "down", "left", "right"
257
+ * - Ctrl combinations: "ctrl+c", "ctrl+z", etc.
258
+ * - Shift combinations: "shift+tab", "shift+enter"
259
+ * - Alt combinations: "alt+enter", "alt+backspace"
260
+ * - Super combinations: "super+k", "super+enter"
261
+ * - Combined modifiers: "shift+ctrl+p", "ctrl+alt+x", "ctrl+super+k"
262
+ *
263
+ * Use the Key helper for autocomplete: Key.ctrl("c"), Key.escape, Key.ctrlShift("p"), Key.super("k")
264
+ *
265
+ * @param data - Raw input data from terminal
266
+ * @param keyId - Key identifier (e.g., "ctrl+c", "escape", Key.ctrl("c"))
267
+ */
268
+ declare function matchesKey(data: string, keyId: KeyId): boolean;
269
+ declare function parseKey(data: string): string | undefined;
270
+ /**
271
+ * Decode a Kitty CSI-u sequence into a printable character, if applicable.
272
+ *
273
+ * When Kitty keyboard protocol flag 1 (disambiguate) is active, terminals send
274
+ * CSI-u sequences for all keys, including plain printable characters. This
275
+ * function extracts the printable character from such sequences.
276
+ *
277
+ * Only accepts plain or Shift-modified keys. Rejects Ctrl, Alt, and unsupported
278
+ * modifier combinations (those are handled by keybinding matching instead).
279
+ * Prefers the shifted keycode when Shift is held and a shifted key is reported.
280
+ *
281
+ * @param data - Raw input data from terminal
282
+ * @returns The printable character, or undefined if not a printable CSI-u sequence
283
+ */
284
+ declare function decodeKittyPrintable(data: string): string | undefined;
285
+ //#endregion
286
+ //#region src/compat/vendor/pi-tui-terminal-colors.d.ts
287
+ interface RgbColor {
288
+ r: number;
289
+ g: number;
290
+ b: number;
291
+ }
292
+ type TerminalColorScheme = "dark" | "light";
293
+ declare function parseOsc11BackgroundColor(data: string): RgbColor | undefined;
294
+ declare function parseTerminalColorSchemeReport(data: string): TerminalColorScheme | undefined;
295
+ //#endregion
296
+ //#region src/compat/vendor/pi-tui-keybindings.d.ts
297
+ /**
298
+ * Global keybinding registry.
299
+ * Downstream packages can add keybindings via declaration merging.
300
+ */
301
+ interface Keybindings {
302
+ "tui.editor.cursorUp": true;
303
+ "tui.editor.cursorDown": true;
304
+ "tui.editor.historyPrevious": true;
305
+ "tui.editor.historyNext": true;
306
+ "tui.editor.cursorLeft": true;
307
+ "tui.editor.cursorRight": true;
308
+ "tui.editor.cursorWordLeft": true;
309
+ "tui.editor.cursorWordRight": true;
310
+ "tui.editor.cursorLineStart": true;
311
+ "tui.editor.cursorLineEnd": true;
312
+ "tui.editor.jumpForward": true;
313
+ "tui.editor.jumpBackward": true;
314
+ "tui.editor.pageUp": true;
315
+ "tui.editor.pageDown": true;
316
+ "tui.editor.deleteCharBackward": true;
317
+ "tui.editor.deleteCharForward": true;
318
+ "tui.editor.deleteWordBackward": true;
319
+ "tui.editor.deleteWordForward": true;
320
+ "tui.editor.deleteToLineStart": true;
321
+ "tui.editor.deleteToLineEnd": true;
322
+ "tui.editor.yank": true;
323
+ "tui.editor.yankPop": true;
324
+ "tui.editor.undo": true;
325
+ "tui.input.newLine": true;
326
+ "tui.input.submit": true;
327
+ "tui.input.tab": true;
328
+ "tui.input.copy": true;
329
+ "tui.select.up": true;
330
+ "tui.select.down": true;
331
+ "tui.select.pageUp": true;
332
+ "tui.select.pageDown": true;
333
+ "tui.select.confirm": true;
334
+ "tui.select.cancel": true;
335
+ "tui.altScreen.pageUp": true;
336
+ "tui.altScreen.pageDown": true;
337
+ "tui.altScreen.halfPageUp": true;
338
+ "tui.altScreen.halfPageDown": true;
339
+ "tui.altScreen.lineUp": true;
340
+ "tui.altScreen.lineDown": true;
341
+ "tui.altScreen.previousPrompt": true;
342
+ "tui.altScreen.nextPrompt": true;
343
+ "tui.altScreen.search": true;
344
+ "tui.altScreen.searchNext": true;
345
+ "tui.altScreen.searchPrevious": true;
346
+ "tui.altScreen.searchClose": true;
347
+ "tui.altScreen.top": true;
348
+ "tui.altScreen.bottom": true;
349
+ }
350
+ type Keybinding = keyof Keybindings;
351
+ interface KeybindingDefinition {
352
+ defaultKeys: KeyId | KeyId[];
353
+ description?: string;
354
+ }
355
+ type KeybindingDefinitions = Record<string, KeybindingDefinition>;
356
+ type KeybindingsConfig = Record<string, KeyId | KeyId[] | undefined>;
357
+ declare const TUI_KEYBINDINGS: {
358
+ readonly "tui.editor.cursorUp": {
359
+ readonly defaultKeys: "up";
360
+ readonly description: "Move cursor up";
361
+ };
362
+ readonly "tui.editor.cursorDown": {
363
+ readonly defaultKeys: "down";
364
+ readonly description: "Move cursor down";
365
+ };
366
+ readonly "tui.editor.historyPrevious": {
367
+ readonly defaultKeys: [];
368
+ readonly description: "Select previous prompt history entry";
369
+ };
370
+ readonly "tui.editor.historyNext": {
371
+ readonly defaultKeys: [];
372
+ readonly description: "Select next prompt history entry";
373
+ };
374
+ readonly "tui.editor.cursorLeft": {
375
+ readonly defaultKeys: ["left", "ctrl+b"];
376
+ readonly description: "Move cursor left";
377
+ };
378
+ readonly "tui.editor.cursorRight": {
379
+ readonly defaultKeys: ["right", "ctrl+f"];
380
+ readonly description: "Move cursor right";
381
+ };
382
+ readonly "tui.editor.cursorWordLeft": {
383
+ readonly defaultKeys: ["alt+left", "ctrl+left", "alt+b"];
384
+ readonly description: "Move cursor word left";
385
+ };
386
+ readonly "tui.editor.cursorWordRight": {
387
+ readonly defaultKeys: ["alt+right", "ctrl+right", "alt+f"];
388
+ readonly description: "Move cursor word right";
389
+ };
390
+ readonly "tui.editor.cursorLineStart": {
391
+ readonly defaultKeys: ["home", "ctrl+home", "ctrl+a"];
392
+ readonly description: "Move to line start";
393
+ };
394
+ readonly "tui.editor.cursorLineEnd": {
395
+ readonly defaultKeys: ["end", "ctrl+end", "ctrl+e"];
396
+ readonly description: "Move to line end";
397
+ };
398
+ readonly "tui.editor.jumpForward": {
399
+ readonly defaultKeys: "ctrl+]";
400
+ readonly description: "Jump forward to character";
401
+ };
402
+ readonly "tui.editor.jumpBackward": {
403
+ readonly defaultKeys: "ctrl+alt+]";
404
+ readonly description: "Jump backward to character";
405
+ };
406
+ readonly "tui.editor.pageUp": {
407
+ readonly defaultKeys: ["pageUp", "ctrl+pageUp"];
408
+ readonly description: "Page up";
409
+ };
410
+ readonly "tui.editor.pageDown": {
411
+ readonly defaultKeys: ["pageDown", "ctrl+pageDown"];
412
+ readonly description: "Page down";
413
+ };
414
+ readonly "tui.editor.deleteCharBackward": {
415
+ readonly defaultKeys: "backspace";
416
+ readonly description: "Delete character backward";
417
+ };
418
+ readonly "tui.editor.deleteCharForward": {
419
+ readonly defaultKeys: ["delete", "ctrl+d"];
420
+ readonly description: "Delete character forward";
421
+ };
422
+ readonly "tui.editor.deleteWordBackward": {
423
+ readonly defaultKeys: ["ctrl+w", "alt+backspace"];
424
+ readonly description: "Delete word backward";
425
+ };
426
+ readonly "tui.editor.deleteWordForward": {
427
+ readonly defaultKeys: ["alt+d", "alt+delete"];
428
+ readonly description: "Delete word forward";
429
+ };
430
+ readonly "tui.editor.deleteToLineStart": {
431
+ readonly defaultKeys: "ctrl+u";
432
+ readonly description: "Delete to line start";
433
+ };
434
+ readonly "tui.editor.deleteToLineEnd": {
435
+ readonly defaultKeys: "ctrl+k";
436
+ readonly description: "Delete to line end";
437
+ };
438
+ readonly "tui.editor.yank": {
439
+ readonly defaultKeys: "ctrl+y";
440
+ readonly description: "Yank";
441
+ };
442
+ readonly "tui.editor.yankPop": {
443
+ readonly defaultKeys: "alt+y";
444
+ readonly description: "Yank pop";
445
+ };
446
+ readonly "tui.editor.undo": {
447
+ readonly defaultKeys: "ctrl+-";
448
+ readonly description: "Undo";
449
+ };
450
+ readonly "tui.input.newLine": {
451
+ readonly defaultKeys: ["shift+enter", "ctrl+j"];
452
+ readonly description: "Insert newline";
453
+ };
454
+ readonly "tui.input.submit": {
455
+ readonly defaultKeys: "enter";
456
+ readonly description: "Submit input";
457
+ };
458
+ readonly "tui.input.tab": {
459
+ readonly defaultKeys: "tab";
460
+ readonly description: "Tab / autocomplete";
461
+ };
462
+ readonly "tui.input.copy": {
463
+ readonly defaultKeys: "ctrl+c";
464
+ readonly description: "Copy selection";
465
+ };
466
+ readonly "tui.select.up": {
467
+ readonly defaultKeys: "up";
468
+ readonly description: "Move selection up";
469
+ };
470
+ readonly "tui.select.down": {
471
+ readonly defaultKeys: "down";
472
+ readonly description: "Move selection down";
473
+ };
474
+ readonly "tui.select.pageUp": {
475
+ readonly defaultKeys: "pageUp";
476
+ readonly description: "Selection page up";
477
+ };
478
+ readonly "tui.select.pageDown": {
479
+ readonly defaultKeys: "pageDown";
480
+ readonly description: "Selection page down";
481
+ };
482
+ readonly "tui.select.confirm": {
483
+ readonly defaultKeys: "enter";
484
+ readonly description: "Confirm selection";
485
+ };
486
+ readonly "tui.select.cancel": {
487
+ readonly defaultKeys: ["escape", "ctrl+c"];
488
+ readonly description: "Cancel selection";
489
+ };
490
+ readonly "tui.altScreen.pageUp": {
491
+ readonly defaultKeys: "pageUp";
492
+ readonly description: "Scroll viewport up one page";
493
+ };
494
+ readonly "tui.altScreen.pageDown": {
495
+ readonly defaultKeys: "pageDown";
496
+ readonly description: "Scroll viewport down one page";
497
+ };
498
+ readonly "tui.altScreen.halfPageUp": {
499
+ readonly defaultKeys: [];
500
+ readonly description: "Scroll viewport up half a page";
501
+ };
502
+ readonly "tui.altScreen.halfPageDown": {
503
+ readonly defaultKeys: [];
504
+ readonly description: "Scroll viewport down half a page";
505
+ };
506
+ readonly "tui.altScreen.lineUp": {
507
+ readonly defaultKeys: [];
508
+ readonly description: "Scroll viewport up one line";
509
+ };
510
+ readonly "tui.altScreen.lineDown": {
511
+ readonly defaultKeys: [];
512
+ readonly description: "Scroll viewport down one line";
513
+ };
514
+ readonly "tui.altScreen.previousPrompt": {
515
+ readonly defaultKeys: "ctrl+shift+up";
516
+ readonly description: "Jump to previous semantic prompt";
517
+ };
518
+ readonly "tui.altScreen.nextPrompt": {
519
+ readonly defaultKeys: "ctrl+shift+down";
520
+ readonly description: "Jump to next semantic prompt";
521
+ };
522
+ readonly "tui.altScreen.search": {
523
+ readonly defaultKeys: "ctrl+shift+f";
524
+ readonly description: "Search the primary scroll view";
525
+ };
526
+ readonly "tui.altScreen.searchNext": {
527
+ readonly defaultKeys: ["enter", "ctrl+g"];
528
+ readonly description: "Select the next search match";
529
+ };
530
+ readonly "tui.altScreen.searchPrevious": {
531
+ readonly defaultKeys: ["shift+enter", "ctrl+shift+g"];
532
+ readonly description: "Select the previous search match";
533
+ };
534
+ readonly "tui.altScreen.searchClose": {
535
+ readonly defaultKeys: "escape";
536
+ readonly description: "Close transcript search";
537
+ };
538
+ readonly "tui.altScreen.top": {
539
+ readonly defaultKeys: "home";
540
+ readonly description: "Scroll viewport to top";
541
+ };
542
+ readonly "tui.altScreen.bottom": {
543
+ readonly defaultKeys: "end";
544
+ readonly description: "Scroll viewport to bottom";
545
+ };
546
+ };
547
+ interface KeybindingConflict {
548
+ key: KeyId;
549
+ keybindings: string[];
550
+ }
551
+ declare class KeybindingsManager {
552
+ private definitions;
553
+ private userBindings;
554
+ private keysById;
555
+ private conflicts;
556
+ constructor(definitions: KeybindingDefinitions, userBindings?: KeybindingsConfig);
557
+ private rebuild;
558
+ matches(data: string, keybinding: Keybinding): boolean;
559
+ getKeys(keybinding: Keybinding): KeyId[];
560
+ getDefinition(keybinding: Keybinding): KeybindingDefinition;
561
+ getConflicts(): KeybindingConflict[];
562
+ setUserBindings(userBindings: KeybindingsConfig): void;
563
+ getUserBindings(): KeybindingsConfig;
564
+ getResolvedBindings(): KeybindingsConfig;
565
+ }
566
+ declare function setKeybindings(keybindings: KeybindingsManager): void;
567
+ declare function getKeybindings(): KeybindingsManager;
568
+ //#endregion
569
+ //#region src/compat/vendor/pi-tui-latex.d.ts
570
+ interface RenderLatexOptions {
571
+ /** Stack fractions and operator limits vertically for display math (default: false). */
572
+ display?: boolean;
573
+ }
574
+ /**
575
+ * Render a basic LaTeX math expression as terminal-friendly Unicode text.
576
+ * Returns undefined when the expression contains unsupported or malformed syntax.
577
+ */
578
+ declare function renderLatex(source: string, options?: RenderLatexOptions): string | undefined;
579
+ //#endregion
580
+ //#region src/compat/vendor/pi-tui-terminal-image.d.ts
581
+ type ImageProtocol = "kitty" | "iterm2" | null;
582
+ interface TerminalCapabilities {
583
+ images: ImageProtocol;
584
+ trueColor: boolean;
585
+ hyperlinks: boolean;
586
+ }
587
+ interface CellDimensions {
588
+ widthPx: number;
589
+ heightPx: number;
590
+ }
591
+ interface ImageDimensions {
592
+ widthPx: number;
593
+ heightPx: number;
594
+ }
595
+ declare function getCellDimensions(): CellDimensions;
596
+ declare function setCellDimensions(dims: CellDimensions): void;
597
+ declare function detectCapabilities(tmuxForwardsHyperlink?: () => boolean): TerminalCapabilities;
598
+ declare function getCapabilities(): TerminalCapabilities;
599
+ declare function resetCapabilitiesCache(): void;
600
+ /** Override the cached capabilities. Useful in tests to exercise both code paths. */
601
+ declare function setCapabilities(caps: TerminalCapabilities): void;
602
+ /**
603
+ * Generate a random image ID for Kitty graphics protocol.
604
+ * Uses random IDs to avoid collisions between different module instances
605
+ * (e.g., main app vs extensions).
606
+ */
607
+ declare function allocateImageId(): number;
608
+ declare function encodeKitty(base64Data: string, options?: {
609
+ columns?: number;
610
+ rows?: number;
611
+ imageId?: number;
612
+ /** Whether Kitty should apply its default cursor movement after placement. Default: true. */
613
+ moveCursor?: boolean;
614
+ }): string;
615
+ /**
616
+ * Delete a Kitty graphics image by ID.
617
+ * Uses uppercase 'I' to also free the image data.
618
+ */
619
+ declare function deleteKittyImage(imageId: number): string;
620
+ /**
621
+ * Delete all visible Kitty graphics images.
622
+ * Uses uppercase 'A' to also free the image data.
623
+ */
624
+ declare function deleteAllKittyImages(): string;
625
+ declare function encodeITerm2(base64Data: string, options?: {
626
+ width?: number | string;
627
+ height?: number | string;
628
+ name?: string;
629
+ preserveAspectRatio?: boolean;
630
+ inline?: boolean;
631
+ }): string;
632
+ declare function calculateImageRows(imageDimensions: ImageDimensions, targetWidthCells: number, cellDimensions?: CellDimensions): number;
633
+ declare function getPngDimensions(base64Data: string): ImageDimensions | null;
634
+ declare function getJpegDimensions(base64Data: string): ImageDimensions | null;
635
+ declare function getGifDimensions(base64Data: string): ImageDimensions | null;
636
+ declare function getWebpDimensions(base64Data: string): ImageDimensions | null;
637
+ declare function getImageDimensions(base64Data: string, mimeType: string): ImageDimensions | null;
638
+ /**
639
+ * Wrap text in an OSC 8 hyperlink sequence.
640
+ * The text is rendered as a clickable hyperlink in terminals that support OSC 8
641
+ * (Ghostty, Kitty, WezTerm, iTerm2, VSCode, and others).
642
+ * In terminals that do not support OSC 8, the escape sequences are ignored
643
+ * and only the plain text is displayed.
644
+ *
645
+ * @param text - The visible text to display
646
+ * @param url - The URL to link to
647
+ */
648
+ declare function hyperlink(text: string, url: string): string;
649
+ /**
650
+ * Text fallback when the terminal cannot render inline images.
651
+ * Absolute paths are shown shortened (~/...) and, when OSC 8 hyperlinks are
652
+ * available, linked to file:// so the full path remains openable.
653
+ */
654
+ declare function imageFallback(mimeType: string, dimensions?: ImageDimensions, filename?: string): string;
655
+ //#endregion
656
+ //#region src/compat/vendor/pi-tui-autocomplete.d.ts
657
+ interface AutocompleteItem {
658
+ value: string;
659
+ label: string;
660
+ description?: string;
661
+ }
662
+ type Awaitable<T> = T | Promise<T>;
663
+ interface SlashCommand {
664
+ name: string;
665
+ description?: string;
666
+ argumentHint?: string;
667
+ getArgumentCompletions?(argumentPrefix: string): Awaitable<AutocompleteItem[] | null>;
668
+ }
669
+ interface AutocompleteSuggestions {
670
+ items: AutocompleteItem[];
671
+ prefix: string;
672
+ }
673
+ interface AutocompleteProvider {
674
+ /** Characters that should naturally trigger this provider at token boundaries. */
675
+ triggerCharacters?: string[];
676
+ getSuggestions(lines: string[], cursorLine: number, cursorCol: number, options: {
677
+ signal: AbortSignal;
678
+ force?: boolean;
679
+ }): Promise<AutocompleteSuggestions | null>;
680
+ applyCompletion(lines: string[], cursorLine: number, cursorCol: number, item: AutocompleteItem, prefix: string): {
681
+ lines: string[];
682
+ cursorLine: number;
683
+ cursorCol: number;
684
+ };
685
+ shouldTriggerFileCompletion?(lines: string[], cursorLine: number, cursorCol: number): boolean;
686
+ }
687
+ declare class CombinedAutocompleteProvider implements AutocompleteProvider {
688
+ private commands;
689
+ private basePath;
690
+ private fdPath;
691
+ constructor(commands: (SlashCommand | AutocompleteItem)[] | undefined, basePath: string, fdPath?: string | null);
692
+ getSuggestions(lines: string[], cursorLine: number, cursorCol: number, options: {
693
+ signal: AbortSignal;
694
+ force?: boolean;
695
+ }): Promise<AutocompleteSuggestions | null>;
696
+ applyCompletion(lines: string[], cursorLine: number, cursorCol: number, item: AutocompleteItem, prefix: string): {
697
+ lines: string[];
698
+ cursorLine: number;
699
+ cursorCol: number;
700
+ };
701
+ private extractAtPrefix;
702
+ private extractPathPrefix;
703
+ private expandHomePath;
704
+ private resolveScopedFuzzyQuery;
705
+ private scopedPathForDisplay;
706
+ private getFileSuggestions;
707
+ private scoreEntry;
708
+ private getFuzzyFileSuggestions;
709
+ shouldTriggerFileCompletion(lines: string[], cursorLine: number, cursorCol: number): boolean;
710
+ }
711
+ //#endregion
712
+ //#region src/compat/pi-tui.d.ts
713
+ declare const CURSOR_MARKER = "_pi:c";
714
+ interface Component {
715
+ render(width: number): string[];
716
+ invalidate(): void;
717
+ handleInput?(data: string): void;
718
+ wantsKeyRelease?: boolean;
719
+ }
720
+ interface Focusable {
721
+ focused: boolean;
722
+ }
723
+ declare function isFocusable(value: unknown): value is Focusable;
724
+ declare class Container implements Component {
725
+ children: Component[];
726
+ addChild(child: Component): void;
727
+ removeChild(child: Component): void;
728
+ clear(): void;
729
+ invalidate(): void;
730
+ render(width: number): string[];
731
+ }
732
+ declare class Text implements Component {
733
+ text: string;
734
+ paddingX: number;
735
+ paddingY: number;
736
+ private customBgFn;
737
+ constructor(text?: string, paddingX?: number, paddingY?: number, customBgFn?: (text: string) => string);
738
+ setText(text: string): void;
739
+ setCustomBgFn(customBgFn?: (text: string) => string): void;
740
+ invalidate(): void;
741
+ render(width: number): string[];
742
+ }
743
+ declare class TruncatedText implements Component {
744
+ text: string;
745
+ paddingX: number;
746
+ paddingY: number;
747
+ constructor(text: string, paddingX?: number, paddingY?: number);
748
+ invalidate(): void;
749
+ render(width: number): string[];
750
+ }
751
+ declare class Spacer implements Component {
752
+ private lines;
753
+ constructor(lines?: number);
754
+ setLines(lines: number): void;
755
+ invalidate(): void;
756
+ render(_width: number): string[];
757
+ }
758
+ declare class Box implements Component {
759
+ paddingX: number;
760
+ paddingY: number;
761
+ private children;
762
+ private bgFn;
763
+ constructor(paddingX?: number, paddingY?: number, bgFn?: (text: string) => string);
764
+ addChild(component: Component): void;
765
+ removeChild(component: Component): void;
766
+ clear(): void;
767
+ setBgFn(bgFn?: (text: string) => string): void;
768
+ invalidate(): void;
769
+ render(width: number): string[];
770
+ }
771
+ interface MarkdownTheme {
772
+ [key: string]: unknown;
773
+ }
774
+ interface MarkdownOptions {
775
+ [key: string]: unknown;
776
+ }
777
+ type DefaultTextStyle = (text: string) => string;
778
+ declare class Markdown implements Component {
779
+ text: string;
780
+ paddingX: number;
781
+ paddingY: number;
782
+ private theme?;
783
+ private options?;
784
+ constructor(text?: string, paddingX?: number, paddingY?: number, theme?: MarkdownTheme | undefined, options?: MarkdownOptions | undefined);
785
+ setText(text: string): void;
786
+ invalidate(): void;
787
+ render(width: number): string[];
788
+ }
789
+ interface SelectItem {
790
+ value: string;
791
+ label: string;
792
+ description?: string;
793
+ }
794
+ interface SelectListTheme {
795
+ selectedPrefix?: unknown;
796
+ selectedText?: unknown;
797
+ description?: unknown;
798
+ scrollInfo?: unknown;
799
+ noMatch?: unknown;
800
+ [key: string]: unknown;
801
+ }
802
+ interface SelectListLayoutOptions {
803
+ minPrimaryColumnWidth?: number;
804
+ maxPrimaryColumnWidth?: number;
805
+ truncatePrimary?: unknown;
806
+ }
807
+ interface SelectListTruncatePrimaryContext {
808
+ [key: string]: unknown;
809
+ }
810
+ declare class SelectList implements Component {
811
+ private items;
812
+ private maxVisible;
813
+ private theme;
814
+ private layout;
815
+ onSelect?: (item: SelectItem) => void;
816
+ onCancel?: () => void;
817
+ onSelectionChange?: (item: SelectItem) => void;
818
+ private filtered;
819
+ private selectedIndex;
820
+ constructor(items: SelectItem[], maxVisible: number, theme: SelectListTheme, layout?: SelectListLayoutOptions);
821
+ setFilter(filter: string): void;
822
+ setSelectedIndex(index: number): void;
823
+ getSelectedItem(): SelectItem | null;
824
+ invalidate(): void;
825
+ handleInput(_keyData: string): void;
826
+ render(width: number): string[];
827
+ }
828
+ interface SettingItem {
829
+ id: string;
830
+ label: string;
831
+ description?: string;
832
+ currentValue: string;
833
+ values?: string[];
834
+ submenu?: (currentValue: string, done: (selectedValue?: string) => void) => Component;
835
+ }
836
+ interface SettingsListTheme {
837
+ label?: unknown;
838
+ value?: unknown;
839
+ description?: unknown;
840
+ cursor?: unknown;
841
+ hint?: unknown;
842
+ [key: string]: unknown;
843
+ }
844
+ interface SettingsListOptions {
845
+ enableSearch?: boolean;
846
+ }
847
+ declare class SettingsList implements Component {
848
+ private items;
849
+ private maxVisible;
850
+ private theme;
851
+ private onChange;
852
+ private onCancel;
853
+ private options;
854
+ constructor(items: SettingItem[], maxVisible: number, theme: SettingsListTheme, onChange: (id: string, newValue: string) => void, onCancel: () => void, options?: SettingsListOptions);
855
+ updateValue(id: string, newValue: string): void;
856
+ invalidate(): void;
857
+ handleInput(_data: string): void;
858
+ render(width: number): string[];
859
+ }
860
+ declare class Input implements Component, Focusable {
861
+ focused: boolean;
862
+ onSubmit?: (value: string) => void;
863
+ onEscape?: () => void;
864
+ private value;
865
+ getValue(): string;
866
+ setValue(value: string): void;
867
+ handleInput(data: string): void;
868
+ invalidate(): void;
869
+ render(width: number): string[];
870
+ }
871
+ interface EditorTheme {
872
+ borderColor?: (s: string) => string;
873
+ selectList?: SelectListTheme;
874
+ [key: string]: unknown;
875
+ }
876
+ interface EditorOptions {
877
+ paddingX?: number;
878
+ autocompleteMaxVisible?: number;
879
+ }
880
+ interface EditorComponent {
881
+ getText(): string;
882
+ setText(text: string): void;
883
+ handleInput(data: string): void;
884
+ onSubmit?: (text: string) => void;
885
+ onChange?: (text: string) => void;
886
+ addToHistory?(text: string): void;
887
+ insertTextAtCursor?(text: string): void;
888
+ getExpandedText?(): string;
889
+ setAutocompleteProvider?(provider: AutocompleteProvider): void;
890
+ }
891
+ declare class Editor implements Component, Focusable, EditorComponent {
892
+ private tui?;
893
+ private theme;
894
+ private options;
895
+ focused: boolean;
896
+ borderColor: (str: string) => string;
897
+ onSubmit?: (text: string) => void;
898
+ onChange?: (text: string) => void;
899
+ disableSubmit: boolean;
900
+ private text;
901
+ private history;
902
+ private autocompleteProvider?;
903
+ constructor(tui?: unknown | undefined, theme?: EditorTheme, options?: EditorOptions);
904
+ getText(): string;
905
+ setText(text: string): void;
906
+ getExpandedText(): string;
907
+ insertTextAtCursor(text: string): void;
908
+ addToHistory(text: string): void;
909
+ setAutocompleteProvider(provider: AutocompleteProvider): void;
910
+ getPaddingX(): number;
911
+ setPaddingX(padding: number): void;
912
+ getAutocompleteMaxVisible(): number;
913
+ setAutocompleteMaxVisible(maxVisible: number): void;
914
+ handleInput(data: string): void;
915
+ invalidate(): void;
916
+ render(width: number): string[];
917
+ }
918
+ interface StackEntryOptions {
919
+ [key: string]: unknown;
920
+ }
921
+ type StackChild = Component | {
922
+ component: Component;
923
+ options?: StackEntryOptions;
924
+ };
925
+ interface StackEntry {
926
+ component: Component;
927
+ options?: StackEntryOptions;
928
+ }
929
+ interface StackOptions {
930
+ [key: string]: unknown;
931
+ }
932
+ declare class Stack extends Container {
933
+ protected options: StackOptions;
934
+ constructor(children?: StackChild[], options?: StackOptions);
935
+ }
936
+ declare class VStack extends Stack {}
937
+ declare class HStack extends Stack {
938
+ render(width: number): string[];
939
+ }
940
+ interface LoaderIndicatorOptions {
941
+ frames?: string[];
942
+ intervalMs?: number;
943
+ }
944
+ declare class Loader extends Text {
945
+ constructor(message?: string, indicator?: LoaderIndicatorOptions);
946
+ start(): void;
947
+ stop(): void;
948
+ setMessage(message: string): void;
949
+ setIndicator(_indicator?: LoaderIndicatorOptions): void;
950
+ }
951
+ declare class CancellableLoader extends Loader {
952
+ onCancel?: () => void;
953
+ handleInput(data: string): void;
954
+ dispose(): void;
955
+ }
956
+ interface ImageOptions {
957
+ [key: string]: unknown;
958
+ }
959
+ interface ImageTheme {
960
+ [key: string]: unknown;
961
+ }
962
+ declare class Image implements Component {
963
+ private base64Data;
964
+ private mimeType;
965
+ private options;
966
+ constructor(base64Data?: string, mimeType?: string, options?: ImageOptions);
967
+ getImageId(): number | undefined;
968
+ invalidate(): void;
969
+ render(width: number): string[];
970
+ }
971
+ interface ScrollViewScrollbar {
972
+ [key: string]: unknown;
973
+ }
974
+ interface ScrollViewOptions {
975
+ [key: string]: unknown;
976
+ }
977
+ interface ScrollViewScrollToOptions {
978
+ [key: string]: unknown;
979
+ }
980
+ declare class ScrollView extends Container {
981
+ private options;
982
+ private scrollTop;
983
+ constructor(component: Component, options?: ScrollViewOptions);
984
+ setScrollbar(_scrollbar: ScrollViewScrollbar): void;
985
+ getContentWidth(width: number): number;
986
+ setScrollbarActive(_active: boolean): void;
987
+ scrollTo(scrollTop: number, _options?: ScrollViewScrollToOptions): void;
988
+ scrollBy(lines: number): number;
989
+ scrollToStart(): void;
990
+ scrollToEnd(): void;
991
+ updateLayout(_contentHeight: number, _viewportHeight: number, _requestRender: () => void): void;
992
+ }
993
+ interface OverlayMargin {
994
+ top?: number;
995
+ right?: number;
996
+ bottom?: number;
997
+ left?: number;
998
+ }
999
+ type SizeValue = number | `${number}%`;
1000
+ interface OverlayAnchor {
1001
+ [key: string]: unknown;
1002
+ }
1003
+ interface OverlayOptions {
1004
+ width?: SizeValue;
1005
+ maxHeight?: SizeValue;
1006
+ anchor?: OverlayAnchor;
1007
+ margin?: OverlayMargin;
1008
+ [key: string]: unknown;
1009
+ }
1010
+ interface OverlayUnfocusOptions {
1011
+ [key: string]: unknown;
1012
+ }
1013
+ interface OverlayHandle {
1014
+ close(): void;
1015
+ [key: string]: unknown;
1016
+ }
1017
+ type TuiMode = 'regular' | 'fullscreen';
1018
+ interface TuiStopOptions {
1019
+ preserveScreen?: boolean;
1020
+ }
1021
+ type TuiInputListenerResult = {
1022
+ consume?: boolean;
1023
+ data?: string;
1024
+ } | undefined;
1025
+ type TuiInputListener = (data: string) => TuiInputListenerResult;
1026
+ interface TUI extends Component {
1027
+ addChild(child: Component): void;
1028
+ removeChild(child: Component): void;
1029
+ clear(): void;
1030
+ setFocus(component: Component | null): void;
1031
+ showOverlay(component: Component, options?: OverlayOptions): OverlayHandle;
1032
+ hideOverlay(): void;
1033
+ hasOverlay(): boolean;
1034
+ requestRender(): void;
1035
+ [key: string]: unknown;
1036
+ }
1037
+ interface ViewportTUI extends TUI {
1038
+ [key: string]: unknown;
1039
+ }
1040
+ declare function isViewportTUI(value: unknown): value is ViewportTUI;
1041
+ //#endregion
1042
+ export { TuiInputListenerResult as $, decodeKittyPrintable as $t, ScrollViewScrollToOptions as A, imageFallback as At, SettingsListTheme as B, Keybindings as Bt, OverlayAnchor as C, truncateToWidth as Cn, getCellDimensions as Ct, OverlayUnfocusOptions as D, getPngDimensions as Dt, OverlayOptions as E, getJpegDimensions as Et, SelectListTheme as F, renderLatex as Ft, StackEntryOptions as G, setKeybindings as Gt, Spacer as H, KeybindingsManager as Ht, SelectListTruncatePrimaryContext as I, Keybinding as It, Text as J, parseOsc11BackgroundColor as Jt, StackOptions as K, RgbColor as Kt, SettingItem as L, KeybindingConflict as Lt, SelectItem as M, setCapabilities as Mt, SelectList as N, setCellDimensions as Nt, ScrollView as O, getWebpDimensions as Ot, SelectListLayoutOptions as P, RenderLatexOptions as Pt, TuiInputListener as Q, KeyId as Qt, SettingsList as R, KeybindingDefinition as Rt, Marked as S, stripTerminalSequences as Sn, getCapabilities as St, OverlayMargin as T, wrapTextWithAnsi as Tn, getImageDimensions as Tt, StackChild as U, TUI_KEYBINDINGS as Ut, SizeValue as V, KeybindingsConfig as Vt, StackEntry as W, getKeybindings as Wt, Tokens as X, Key as Xt, Token as Y, parseTerminalColorSchemeReport as Yt, TruncatedText as Z, KeyEventType as Zt, Loader as _, isPunctuationChar as _n, deleteAllKittyImages as _t, Container as a, setKittyProtocolActive as an, isViewportTUI as at, MarkdownOptions as b, sliceByColumn as bn, encodeITerm2 as bt, EditorComponent as c, fuzzyMatch as cn, AutocompleteSuggestions as ct, Focusable as d, cjkBreakRegex as dn, CellDimensions as dt, isKeyRelease as en, TuiMode as et, HStack as f, extractAnsiCode as fn, ImageDimensions as ft, Input as g, getWordSegmenter as gn, calculateImageRows as gt, ImageTheme as h, getOsc8LinkAtColumn as hn, allocateImageId as ht, Component as i, parseKey as in, isFocusable as it, ScrollViewScrollbar as j, resetCapabilitiesCache as jt, ScrollViewOptions as k, hyperlink as kt, EditorOptions as l, PUNCTUATION_REGEX as ln, CombinedAutocompleteProvider as lt, ImageOptions as m, getGraphemeSegmenter as mn, TerminalCapabilities as mt, CURSOR_MARKER as n, isKittyProtocolActive as nn, VStack as nt, DefaultTextStyle as o, FuzzyMatch as on, AutocompleteItem as ot, Image as p, getGraphemeCellRange as pn, ImageProtocol as pt, TUI as q, TerminalColorScheme as qt, CancellableLoader as r, matchesKey as rn, ViewportTUI as rt, Editor as s, fuzzyFilter as sn, AutocompleteProvider as st, Box as t, isKeyRepeat as tn, TuiStopOptions as tt, EditorTheme as u, applyBackgroundToLine as un, SlashCommand as ut, LoaderIndicatorOptions as v, isWhitespaceChar as vn, deleteKittyImage as vt, OverlayHandle as w, visibleWidth as wn, getGifDimensions as wt, MarkdownTheme as x, sliceWithWidth as xn, encodeKitty as xt, Markdown as y, normalizeTerminalOutput as yn, detectCapabilities as yt, SettingsListOptions as z, KeybindingDefinitions as zt };
1043
+ //# sourceMappingURL=pi-tui-iHoF2tFc.d.mts.map