chore: logging

thinking-toggle-wip
Adam 2025-12-19 05:42:59 -06:00 committed by Aiden Cline
parent 551c5283bd
commit 923bad1f70
1 changed files with 5 additions and 2 deletions

View File

@ -193,14 +193,17 @@ export function SessionTurn(
function handleScroll() {
if (!scrollRef || store.autoScrolled) return
const scrollTop = scrollRef.scrollTop
const reset = scrollTop <= 0 && store.lastScrollTop > 100 && working() && !store.userScrolled
console.log("scrollTop", scrollTop)
console.log("clientHeight", store.contentRef?.clientHeight)
const reset = scrollTop <= 0 && store.lastScrollTop > 0 && working() && !store.userScrolled
if (reset) {
setStore("lastScrollTop", scrollTop)
requestAnimationFrame(scrollToBottom)
return
}
const scrolledUp = scrollTop < store.lastScrollTop - 10
const scrolledUp = scrollTop < store.lastScrollTop - 50
if (scrolledUp && working()) {
console.log("scrolled up")
setStore("userScrolled", true)
props.onUserInteracted?.()
}