mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-05 00:48:32 +00:00
The interactive prompt used a single-line buffer (multiline=False), so there was no way to compose a multi-line message before submitting. Switch to a multiline-capable buffer with custom key bindings: Enter still submits (unchanged feel), Alt+Enter always inserts a newline, and Shift+Enter inserts a newline on terminals that emit a distinguishable CSI-u sequence for it (kitty, iTerm2 with the fixterms protocol) by mapping those sequences onto the otherwise-unused ControlJ key.