You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ac1dbc0
Browse filesBrowse the repository at this point in the historyBrowse files
feat(ui): add bracketed paste detection with large-paste marker collapsing
- Detect bracketed paste (ESC[200~ / ESC[201~) and dispatch as atomic paste event
- Large pastes (>10 lines or >1000 chars) stored and replaced with compact marker
- Ctrl+O toggles expand/collapse with setTimeout(0) to mitigate render flicker
- Backspace/delete atomically removes entire marker (only for real paste IDs)
- Markers highlighted with chalk.yellow only when ID exists in pastesRef
- Follows existing terminal hook patterns (useBracketedPaste alongside useTerminalExtendedKeys)
- Array-based chunk buffering to avoid O(n²) string concat on multi-chunk pastes
- Lazy text cleaning deferred to expand/submit time
- Regex requires line/char suffix to avoid false positives on literal [paste #N]
Known limitation: expand/collapse briefly clears Ink <Static> content (React render pipeline)
Reference: PR #45 (closed), inspired by pi project's segmentWithMarkers approach
0 commit comments