Commit Graph

2 Commits

Author SHA1 Message Date
teknium1 1de9963ce7 fix(cli): backslash continuation runs before the paste-timing guard
Review finding: with multiline shortcuts on, a `\` + Enter arriving inside
a paste kept the literal backslash while a typed one removed it. The
continuation branch inserts a newline anyway, so it runs first and the
outcome no longer depends on timing.
2026-09-12 08:35:16 -07:00
teknium1 40f123ceab fix(cli): Enter arriving mid-paste is a newline, not a per-line steer
Without bracketed paste (tmux strips it; IME/voice dictation emits keys
one at a time) each pasted newline reaches _tui_handle_enter as its own
Enter event, so a multi-line paste while the agent ran became N separate
steering messages. An Enter within 50 ms of the last buffer change is
text still arriving; insert the newline and let the buffer accumulate.
Humans type >50 ms apart, so a real submit is unaffected.

Same mechanism as #10997 (@iRonin) and #19498 (@Ralojeil1), which
targeted the removed classic-CLI handle_enter.

Refs #10994
2026-09-12 08:35:16 -07:00