mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-05 02:07:34 +08:00
fix(tui): handle empty bracketed paste fallback (#15594)
This commit is contained in:
@@ -927,8 +927,8 @@ export function TextInput({
|
||||
} else {
|
||||
v = v.slice(0, c)
|
||||
}
|
||||
} else if (inp.length > 0) {
|
||||
const bracketed = inp.includes('[200~')
|
||||
} else if (event.keypress.isPasted || inp.length > 0) {
|
||||
const bracketed = event.keypress.isPasted || inp.includes('[200~')
|
||||
const text = inp.replace(BRACKET_PASTE, '').replace(/\r\n/g, '\n').replace(/\r/g, '\n')
|
||||
|
||||
if (bracketed && emitPaste({ bracketed: true, cursor: c, text, value: v })) {
|
||||
|
||||
Reference in New Issue
Block a user