Repository navigation
Commit 10d3622
committed
fix(tui): disable sticky scroll when user scrolls up during LLM response
When a user scrolls up to read chat history while an LLM is still
streaming, the view would snap back to the bottom on every token
update due to stickyScroll=true always forcing scroll-to-bottom.
This change tracks user scroll state via a userScrolledUp signal and
makes stickyScroll reactive - only auto-scrolling when the user is
at the bottom. User scroll commands (page up, line up, first message)
set the flag to pause auto-scroll, while toBottom() and last message
reset it to resume.
Fixes anomalyco#41961 parent 41612b3 commit 10d3622
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| 182 | + | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
| |||
303 | 305 | | |
304 | 306 | | |
305 | 307 | | |
| 308 | + | |
306 | 309 | | |
307 | 310 | | |
308 | 311 | | |
| |||
645 | 648 | | |
646 | 649 | | |
647 | 650 | | |
| 651 | + | |
648 | 652 | | |
649 | 653 | | |
650 | 654 | | |
| |||
667 | 671 | | |
668 | 672 | | |
669 | 673 | | |
| 674 | + | |
670 | 675 | | |
671 | 676 | | |
672 | 677 | | |
| |||
689 | 694 | | |
690 | 695 | | |
691 | 696 | | |
| 697 | + | |
692 | 698 | | |
693 | 699 | | |
694 | 700 | | |
| |||
711 | 717 | | |
712 | 718 | | |
713 | 719 | | |
| 720 | + | |
714 | 721 | | |
715 | 722 | | |
716 | 723 | | |
| |||
722 | 729 | | |
723 | 730 | | |
724 | 731 | | |
| 732 | + | |
725 | 733 | | |
726 | 734 | | |
727 | 735 | | |
| |||
1047 | 1055 | | |
1048 | 1056 | | |
1049 | 1057 | | |
1050 | | - | |
| 1058 | + | |
1051 | 1059 | | |
1052 | 1060 | | |
1053 | 1061 | | |
| |||
0 commit comments