Skip to content

Commit 80c3100

Browse files
committed
fix: correct autoheigh scale of autoscroll container
1 parent 639bc9d commit 80c3100

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

custom/conversation_area/ConversationArea.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class="absolute bg-black/10 backdrop-blur-md z-10 h-full w-full"
99
>
1010
</div>
11-
<div class="relative flex-1 min-h-0 overflow-hidden" @click="recalculateScroll()">
11+
<div ref="chatContainerRef" class="relative flex-1 min-h-0 overflow-hidden" @click="recalculateScroll()">
1212
<CustomAutoScrollContainer
1313
v-if="showScrollContainer"
1414
:enabled="!showScrollToBottomButton"
@@ -24,10 +24,6 @@
2424
marginLeft: 'auto',
2525
marginRight: 'auto',
2626
}"
27-
:contentStyle="{
28-
height: '100%',
29-
maxHeight: '100%',
30-
}"
3127
:style="{
3228
maxWidth: agentStore.isFullScreen ? agentStore.MAX_WIDTH+'rem' : '100%',
3329
transition: `
@@ -46,7 +42,10 @@
4642
</div>
4743
<div
4844
v-if="props.messages.length === 0"
49-
class="flex-1 flex flex-col items-center justify-center text-gray-400 tracking-widest text-xl font-medium h-full"
45+
class="flex-1 flex flex-col items-center justify-center text-gray-400 tracking-widest text-xl font-medium h-max"
46+
:style="{
47+
height: chatContainerRef ? chatContainerRef.clientHeight + 'px' : '100%',
48+
}"
5049
>
5150
<p>{{ $t('Start the conversation') }}</p>
5251
<p class="tracking-normal text-base text">{{ $t('Give any input to begin') }}</p>
@@ -84,6 +83,7 @@ const innerScrollContainerRef = ref(null);
8483
const agentStore = useAgentStore();
8584
const agentTransitions = useAgentTransitions();
8685
const showScrollContainer = ref(true);
86+
const chatContainerRef = ref(null);
8787
8888
const scrollHeight = computed(() => {
8989
return scrollContainer.value ? scrollContainer.value.scrollParams.scrollHeight : 0;

0 commit comments

Comments
 (0)