refactor(ui-tui): clean touched resize and sticky prompt paths

Trim comment noise, remove redundant typing, normalize sticky prompt viewport args to top→bottom order, and reuse one sticky viewport helper instead of duplicating the math.
This commit is contained in:
Brooklyn Nicholson 2026-04-23 14:37:00 -05:00
parent 9a885fba31
commit 9bf6e1cd6e
5 changed files with 23 additions and 32 deletions

View file

@ -18,8 +18,8 @@ const upperBound = (offsets: ArrayLike<number>, target: number) => {
export const stickyPromptFromViewport = (
messages: readonly Msg[],
offsets: ArrayLike<number>,
bottom: number,
top: number,
bottom: number,
sticky: boolean
) => {
if (sticky || !messages.length) {