mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-30 01:41:43 +00:00
feat: fix img pasting in new ink plus newline after tools
This commit is contained in:
parent
b04248f4d5
commit
3fd5cf6e3c
8 changed files with 198 additions and 75 deletions
|
|
@ -303,9 +303,12 @@ export function TextInput({ columns = 80, value, onChange, onPaste, onSubmit, pl
|
|||
// ── Input handler ────────────────────────────────────────────────
|
||||
|
||||
useInput(
|
||||
(inp, k) => {
|
||||
// Paste hotkey
|
||||
if ((k.ctrl || k.meta) && inp.toLowerCase() === 'v') {
|
||||
(inp, k, event) => {
|
||||
// Some terminals normalize Ctrl+V to "v"; others deliver raw ^V (\x16).
|
||||
const ctrlPaste = k.ctrl && (inp.toLowerCase() === 'v' || event.keypress.raw === '\x16')
|
||||
const metaPaste = k.meta && inp.toLowerCase() === 'v'
|
||||
|
||||
if (ctrlPaste || metaPaste) {
|
||||
return void emitPaste({ cursor: curRef.current, hotkey: true, text: '', value: vRef.current })
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue