You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tui: scroll-driven loading + windowing in session view
Wires the new pagination helpers into the chat surface:
- maybeLoadOlderMessages / maybeLoadNewerMessages run after every
scroll input (key bindings: page/half-page/line up & down, first
& last; mouse wheel via onMouseScroll). They fire only when the
viewport is within five rows of the corresponding edge and a
cursor is available.
- After a successful prepend, the view restores the previous logical
scroll position by adjusting for the height delta so the user does
not jump.
- When the in-memory window grows past 200 messages and the user is
far from the opposite edge (>4 viewports away), the matching trim
helper evicts the now-distant side; the streaming guard inside
trimNewerMessages prevents dropping an in-flight assistant message.
- A loader spinner is shown at the top of the scrollbox while older
messages are being fetched, and at the bottom while newer ones are
being recovered after eviction.
Timeline dialog kicks off `loadAllMessages` on mount so every prompt
in the session becomes selectable, even ones that were never within
the live window.
0 commit comments