mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-30 01:41:43 +00:00
Merge branch 'feat/ink-refactor' of github.com:NousResearch/hermes-agent into feat/ink-refactor
This commit is contained in:
commit
5552e1ffe1
152 changed files with 7146 additions and 2558 deletions
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue