File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,11 +24,13 @@ const props = withDefaults(defineProps<{
2424 wrapperStyle? : Record <string , string >
2525 contentStyle? : Record <string , string >
2626 scrollBarAutoHide? : boolean
27+ scrollToBottomOnMount? : boolean
2728}>(), {
2829 enabled: true ,
2930 threshold: 50 ,
3031 behavior: ' instant' ,
31- scrollBarAutoHide: true
32+ scrollBarAutoHide: true ,
33+ scrollToBottomOnMount: true
3234})
3335
3436const containerRef = ref <HTMLDivElement | null >(null )
@@ -72,7 +74,7 @@ onMounted(() => {
7274 scrollParams .value .scrollTop = containerRef .value .scrollEl .scrollTop
7375 scrollParams .value .scrollHeight = containerRef .value .scrollEl .scrollHeight
7476 scrollParams .value .clientHeight = containerRef .value .scrollEl .clientHeight
75- if (props . enabled && ! isUserScrolledUp . value ) {
77+ if (! isUserScrolledUp . value && props . scrollToBottomOnMount ) {
7678 scrollToBottom ()
7779 }
7880 })
@@ -102,6 +104,7 @@ function isNearBottom(customThreshold?: number): boolean {
102104}
103105
104106function scrollToBottom(force = false ): void {
107+ console .log (' scrollToBottom called with force:' , force )
105108 const container = containerRef .value ?.scrollEl
106109 if (! container ) return
107110
Original file line number Diff line number Diff line change 1111 <div ref =" chatContainerRef" class =" relative flex-1 min-h-0 overflow-hidden" @click =" recalculateScroll()" >
1212 <CustomAutoScrollContainer
1313 v-if =" showScrollContainer "
14- :enabled =" ! showScrollToBottomButton "
14+ :enabled =" false "
1515 class="relative h-full flex flex-col overflow-y-auto translate-x-[-50%] left-1/2"
1616 ref="scrollContainer"
1717 :threshold =" THRESHOLD_TO_SHOW_BUTTON "
@@ -251,11 +251,11 @@ function scheduleSpacerHeightUpdate() {
251251 pendingSpacerUpdate = null ;
252252
253253 // Auto-scroll to bottom if response generation is in progress
254- if (agentStore .isResponseInProgress ) {
255- nextTick (() => {
256- scrollContainer .value ?.scrollToBottom ();
257- });
258- }
254+ // if (agentStore.isResponseInProgress) {
255+ // nextTick(() => {
256+ // scrollContainer.value?.scrollToBottom();
257+ // });
258+ // }
259259
260260 if (spacerUpdateQueued ) {
261261 scheduleSpacerHeightUpdate ();
You can’t perform that action at this time.
0 commit comments