Skip to content

The open source coding agent.

TypeScript

chore: cleanup

Adam70c6fcfbbfd8
diff --git a/packages/ui/src/hooks/create-auto-scroll.tsx b/packages/ui/src/hooks/create-auto-scroll.tsx
index 26e7e1404d2..3dc520c6213 100644
--- a/packages/ui/src/hooks/create-auto-scroll.tsx
+++ b/packages/ui/src/hooks/create-auto-scroll.tsx
@@ -78,11 +78,13 @@ export function createAutoScroll(options: AutoScrollOptions) {
const scrollToBottom = (force: boolean) => {
if (!force && !active()) return
+
+ if (force && store.userScrolled) setStore("userScrolled", false)
+
const el = scroll
if (!el) return
if (!force && store.userScrolled) return
- if (force && store.userScrolled) setStore("userScrolled", false)
const distance = distanceFromBottom(el)
if (distance < 2) {