mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 10:00:39 +00:00
fix(tui): handle batched input over SSH with StdinBuffer
Adds StdinBuffer class (adapted from OpenTUI, MIT license) to split batched stdin into individual sequences before they reach components. This fixes key presses being dropped when batched with release events, which commonly occurs over SSH due to network buffering. - Each handleInput() call now receives a single event - matchesKey() and isKeyRelease() work correctly without batching awareness - Properly buffers incomplete escape sequences across chunks - Handles bracketed paste mode Addresses #538
This commit is contained in:
parent
615ed0ae2e
commit
f3b7b0b179
5 changed files with 877 additions and 20 deletions
|
|
@ -43,6 +43,8 @@ export {
|
|||
parseKey,
|
||||
setKittyProtocolActive,
|
||||
} from "./keys.js";
|
||||
// Input buffering for batch splitting
|
||||
export { StdinBuffer, type StdinBufferEventMap, type StdinBufferOptions } from "./stdin-buffer.js";
|
||||
// Terminal interface and implementations
|
||||
export { ProcessTerminal, type Terminal } from "./terminal.js";
|
||||
// Terminal image support
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue