mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 15:01:34 +08:00
Merge branch 'feat/ink-refactor' of github.com:NousResearch/hermes-agent into feat/ink-refactor
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import * as Ink from '@hermes/ink'
|
||||
import type { InputEvent, Key } from '@hermes/ink'
|
||||
import { useEffect, useMemo, useRef, useState } from 'react'
|
||||
|
||||
type InkExt = typeof Ink & {
|
||||
@@ -276,7 +277,7 @@ export function TextInput({ columns = 80, value, onChange, onPaste, onSubmit, pl
|
||||
// ── Input handler ────────────────────────────────────────────────
|
||||
|
||||
useInput(
|
||||
(inp, k, event) => {
|
||||
(inp: string, k: Key, event: InputEvent) => {
|
||||
// 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'
|
||||
|
||||
Reference in New Issue
Block a user