fix(tui): stabilize multiline input, persist tool traces, and port CLI-style context status bar

This commit is contained in:
Brooklyn Nicholson 2026-04-08 23:59:56 -05:00
parent c49bbbe8c2
commit b66550ed08
9 changed files with 262 additions and 129 deletions

View file

@ -117,7 +117,11 @@ export function TextInput({ value, onChange, onPaste, onSubmit, placeholder = ''
}
if (k.return) {
onSubmit?.(value)
if (k.shift || k.meta) {
commit(value.slice(0, cur) + '\n' + value.slice(cur), cur + 1)
} else {
onSubmit?.(value)
}
return
}
@ -163,6 +167,12 @@ export function TextInput({ value, onChange, onPaste, onSubmit, placeholder = ''
return
}
if (raw === '\n') {
commit(v.slice(0, c) + '\n' + v.slice(c), c + 1)
return
}
if (raw.length > 1 || raw.includes('\n')) {
if (!pasteBuf.current) {
pastePos.current = c