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
Applying these conditions to our AI chat for the best user experience.
LLM Scrolljacking Manifesto
If the user scrolls to bottom of generated text while still generating, enable auto-scroll
Stop auto-scroll if the user manually scrolls up at any point & do not turn it back on until the user manually scrolls to bottom
On mobile, stop auto-scroll if the user's finger is touching the screen
If you choose to enable auto-scroll by default, stop auto-scrolling when the start of the response gets to the top of the visible window.
Performance tips
Do not trigger auto-scroll callback on every token, only set new scroll position (or animate) when height of the container changes.
If using React hooks, your state machine will depend on re-renders which can add jank due to latency. Use a class component & class variables to keep track of scroll state independent of renders.
Applying these conditions to our AI chat for the best user experience.
LLM Scrolljacking Manifesto
Performance tips
From: https://x.com/mayfer/status/1858698456086282583?s=46&t=pd3uh4BnhkMVspxVU9blSQ
The text was updated successfully, but these errors were encountered: