Skip to content

Commit 97ffc34

Browse files
committed
fix(Smart Question): In the conversation window, when there are many messages and a scroll bar appears, the scroll bar will automatically scroll to the bottom
1 parent 51c419d commit 97ffc34

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

frontend/src/views/chat/RecommendQuestion.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const props = withDefaults(
2121
}
2222
)
2323
24-
const emits = defineEmits(['clickQuestion', 'update:currentChat', 'stop'])
24+
const emits = defineEmits(['clickQuestion', 'update:currentChat', 'stop', 'loadingOver'])
2525
2626
const loading = ref(false)
2727
@@ -134,6 +134,7 @@ async function getRecommendQuestions() {
134134
}
135135
} finally {
136136
loading.value = false
137+
emits('loadingOver')
137138
}
138139
}
139140

frontend/src/views/chat/index.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@
195195
:first-chat="message.first_chat"
196196
@click-question="quickAsk"
197197
@stop="onChatStop"
198+
@loadingOver="loadingOver"
198199
/>
199200
<UserChat v-if="message.role === 'user'" :message="message" />
200201
<template v-if="message.role === 'assistant' && !message.first_chat">
@@ -286,6 +287,7 @@
286287
:first-chat="message.first_chat"
287288
:disabled="isTyping"
288289
@click-question="quickAsk"
290+
@loadingOver="loadingOver"
289291
@stop="onChatStop"
290292
/>
291293
</template>
@@ -676,9 +678,11 @@ async function onChartAnswerFinish(id: number) {
676678
getRecommendQuestionsLoading.value = true
677679
loading.value = false
678680
isTyping.value = false
679-
getRecommendQuestions(id).finally(() => {
680-
getRecommendQuestionsLoading.value = false
681-
})
681+
getRecommendQuestions(id)
682+
}
683+
684+
const loadingOver = () => {
685+
getRecommendQuestionsLoading.value = false
682686
}
683687
684688
function onChartAnswerError() {

0 commit comments

Comments
 (0)