Auto follow cursor is generally a convenient and desirable feature. However, it gets annoying when the model is streaming a very long response spanning more vertical space than the chat window has. In such cases the user might want to read the response from the beginning at a human pace, yet auto follow keeps pushing forward at robot speed.
This PR improves auto follow cursor behavior by conditioning it on the current cursor position. If it is at the last line, auto-following happens. Otherwise, the cursor stays where it is. Effectively, this means that the user can prevent auto-following from happening by simply moving the cursor up.
Auto follow cursor is generally a convenient and desirable feature. However, it gets annoying when the model is streaming a very long response spanning more vertical space than the chat window has. In such cases the user might want to read the response from the beginning at a human pace, yet auto follow keeps pushing forward at robot speed.
This PR improves auto follow cursor behavior by conditioning it on the current cursor position. If it is at the last line, auto-following happens. Otherwise, the cursor stays where it is. Effectively, this means that the user can prevent auto-following from happening by simply moving the cursor up.