mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-15 04:12:25 +00:00
fix(tui): clear Apple Terminal resize artifacts
Use a deeper alt-screen clear for Apple Terminal resize repaints so host reflow artifacts do not survive the recovery frame.
This commit is contained in:
parent
e527240b27
commit
279b656adc
3 changed files with 40 additions and 9 deletions
15
ui-tui/packages/hermes-ink/src/ink/terminal.test.ts
Normal file
15
ui-tui/packages/hermes-ink/src/ink/terminal.test.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { needsAltScreenResizeScrollbackClear } from './terminal.js'
|
||||
|
||||
describe('terminal resize quirks', () => {
|
||||
it('uses a deeper alt-screen resize clear for Apple Terminal', () => {
|
||||
expect(needsAltScreenResizeScrollbackClear({ TERM_PROGRAM: 'Apple_Terminal' })).toBe(true)
|
||||
expect(needsAltScreenResizeScrollbackClear({ TERM_PROGRAM: ' Apple_Terminal ' })).toBe(true)
|
||||
})
|
||||
|
||||
it('keeps the normal resize repaint path for modern terminals', () => {
|
||||
expect(needsAltScreenResizeScrollbackClear({ TERM_PROGRAM: 'vscode' })).toBe(false)
|
||||
expect(needsAltScreenResizeScrollbackClear({ TERM_PROGRAM: 'iTerm.app' })).toBe(false)
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue