mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
feat: fork ink and make it work nicely
This commit is contained in:
parent
cb79018977
commit
8760faf991
139 changed files with 24952 additions and 140 deletions
13
ui-tui/packages/hermes-ink/src/ink/wrapAnsi.ts
Normal file
13
ui-tui/packages/hermes-ink/src/ink/wrapAnsi.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import wrapAnsiNpm from 'wrap-ansi'
|
||||
|
||||
type WrapAnsiOptions = {
|
||||
hard?: boolean
|
||||
wordWrap?: boolean
|
||||
trim?: boolean
|
||||
}
|
||||
|
||||
const wrapAnsiBun = typeof Bun !== 'undefined' && typeof Bun.wrapAnsi === 'function' ? Bun.wrapAnsi : null
|
||||
|
||||
const wrapAnsi: (input: string, columns: number, options?: WrapAnsiOptions) => string = wrapAnsiBun ?? wrapAnsiNpm
|
||||
|
||||
export { wrapAnsi }
|
||||
Loading…
Add table
Add a link
Reference in a new issue