fix(tui): preserve prompt separator width (#19340)

* fix(tui): preserve prompt separator width

* fix(tui): align transcript height estimates with prompt width
This commit is contained in:
asheriif 2026-05-04 18:58:40 +02:00 committed by GitHub
parent d9c090fe36
commit 0ce1b9fe20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 85 additions and 7 deletions

View file

@ -17,6 +17,13 @@ describe('virtual height estimates', () => {
expect(estimatedMsgHeight(msg, 35, { compact: false, details: false })).toBeGreaterThan(5)
})
it('uses compound user prompt width when estimating user message wrapping', () => {
const msg: Msg = { role: 'user', text: 'x'.repeat(21) }
expect(estimatedMsgHeight(msg, 26, { compact: false, details: false, userPrompt: '' })).toBe(3)
expect(estimatedMsgHeight(msg, 26, { compact: false, details: false, userPrompt: 'Ψ >' })).toBe(4)
})
it('includes detail sections when visible', () => {
const msg: Msg = { role: 'assistant', text: 'ok', thinking: 'line 1\nline 2', tools: ['Tool A', 'Tool B'] }