mirror of
https://github.com/cline/cline.git
synced 2026-09-11 16:42:40 +08:00
bee3d2415ac50d26dcfea72978520e187bf93471
## Summary When the user submits a message, the chat scrollbox now programmatically scrolls to the bottom. Previously the `stickyScroll` prop handled this in most cases, but there was a timing issue where new content wouldn't trigger a scroll if the layout hadn't settled yet. The fix uses a `userSubmissionScrollKey` derived from checking if the last entry is `user_submitted`, which triggers a `useEffect` that calls `scrollbox.scrollTo(scrollbox.scrollHeight)`. It fires the scroll three ways -- synchronously, via `queueMicrotask`, and via `setTimeout(_, 0)` -- to cover different layout timing scenarios. The ref is typed as `ScrollBoxRenderable` from `@opentui/core`. ## Test plan - [ ] Submit a message in the CLI chat and verify it scrolls to the bottom - [ ] Verify scrolling still works correctly when the chat history is long enough to overflow - [ ] Verify stickyScroll still works during streaming (assistant typing)
Description
Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, using the browser, and more with your permission every step of the way.
2.1 GiB
Languages
TypeScript
96.1%
JavaScript
2.2%
Python
0.4%
PureBasic
0.4%
CSS
0.3%
Other
0.6%