mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-07 02:51:50 +00:00
13 lines
364 B
TypeScript
13 lines
364 B
TypeScript
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 }
|