fix(tui): render explicit prompt gap

Reserve the composer prompt gap as layout instead of relying on terminal handling of trailing spaces.
This commit is contained in:
Brooklyn Nicholson 2026-04-29 15:25:06 -05:00
parent 456955c2e4
commit 10fcd620d2
3 changed files with 50 additions and 9 deletions

View file

@ -53,6 +53,10 @@ export function inputVisualHeight(value: string, columns: number) {
return cursorLayout(value, value.length, columns).line + 1
}
export function composerPromptWidth(promptText: string) {
return Math.max(1, stringWidth(promptText)) + 1
}
export function stableComposerColumns(totalCols: number, promptWidth: number) {
// Physical render/wrap width. Always reserve outer composer padding and
// prompt prefix. Only reserve the transcript scrollbar gutter when the