This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

feat(tui): expose bracketedPasteMode on PtyHandle

Add a readonly bracketedPasteMode: boolean to PtyHandle, parallel to the
existing alternateScreen / mouseMode / kittyKeyboardFlags getters.
Delegates to xterm-headless's native terminal.modes.bracketedPasteMode —
no manual CSI parser tracking needed.

Use case: pty-layout currently enables \\e[?2004h on its outer terminal
unconditionally so editors like helix get paste-no-indent. That forwards
paste markers to any focused pane regardless of whether the program
consuming stdin handles them; a CLI using gets() can receive literal ESC
sequences in pasted content. With this getter, pty-layout can proxy the
mode by-pane: when the focused pane has it on, write \\e[?2004h to outer;
when it doesn't, write \\e[?2004l.

Nathan Herald (May 7, 2026, 10:53 AM +0200) 8301727d 71e8a834

+7
+2
src/tui/builders.ts
··· 550 550 get mouseMode() { return mouseMode; }, 551 551 get alternateScreen() { return terminal.buffer.active.type === "alternate"; }, 552 552 get kittyKeyboardFlags() { return [...kittyKeyboardStack]; }, 553 + get bracketedPasteMode() { return terminal.modes.bracketedPasteMode; }, 553 554 get scrollback() { return scrollbackSize; }, 554 555 get bufferLength() { return terminal.buffer.active.length; }, 555 556 get baseY() { return terminal.buffer.active.baseY; }, ··· 696 697 get mouseMode() { return mouseMode; }, 697 698 get alternateScreen() { return terminal.buffer.active.type === "alternate"; }, 698 699 get kittyKeyboardFlags() { return [...kittyKeyboardStack]; }, 700 + get bracketedPasteMode() { return terminal.modes.bracketedPasteMode; }, 699 701 get scrollback() { return scrollbackSize; }, 700 702 get bufferLength() { return terminal.buffer.active.length; }, 701 703 get baseY() { return terminal.buffer.active.baseY; },
+5
src/tui/nodes.ts
··· 326 326 * pushes, CSI < u pops). Empty array means the protocol is not active. 327 327 * Returned as a defensive copy — mutating it has no effect on the PTY. */ 328 328 readonly kittyKeyboardFlags: number[]; 329 + /** Whether the child has enabled bracketed paste mode (CSI ? 2004 h). 330 + * When true, the child wraps pasted input in `\x1b[200~ ... \x1b[201~` 331 + * markers and expects them on stdin; consumers proxying paste should 332 + * forward the markers verbatim only to children that have it on. */ 333 + readonly bracketedPasteMode: boolean; 329 334 /** Configured scrollback line count. */ 330 335 readonly scrollback: number; 331 336 /** Total lines in the buffer (viewport + scrollback history). */