fix: Fix the issue where the recommendation is not refreshed after retrieval

This commit is contained in:
wangjiahao
2026-01-29 11:05:20 +08:00
parent 3d440e9a6d
commit a435415f5d
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ const getRecommendQuestions = () => {
const questions = '[]'
const retrieveQuestions = () => {
recommendQuestionRef.value.getRecommendQuestions(10)
recommendQuestionRef.value.getRecommendQuestions(10, true)
recentQuestionRef.value.getRecentQuestions()
}
const quickAsk = (question: string) => {
@@ -48,11 +48,11 @@ function clickQuestion(question: string): void {
const stopFlag = ref(false)
async function getRecommendQuestions(articles_number: number) {
async function getRecommendQuestions(articles_number: number, isRetrieve: false) {
recommendedApi.get_datasource_recommended_base(props.datasource).then((res) => {
if (res.recommended_config === 2) {
questions.value = res.questions
} else if (currentChat.value.recommended_generate) {
} else if (currentChat.value.recommended_generate && !isRetrieve) {
questions.value = currentChat.value.recommended_question as string
} else {
getRecommendQuestionsLLM(articles_number)