fix: Optimize the refresh issue of conversation history。
parent
617937fe58
commit
7ee33b82dc
|
|
@ -59,7 +59,7 @@
|
||||||
</template>
|
</template>
|
||||||
<TransitionContent
|
<TransitionContent
|
||||||
v-if="transcribing"
|
v-if="transcribing"
|
||||||
:text="t('chat.transcribing')"
|
:text="t('chat.inputPlaceholder.recorderLoading')"
|
||||||
:type="type"
|
:type="type"
|
||||||
:application="applicationDetails"
|
:application="applicationDetails"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,8 @@ export default {
|
||||||
prologueMessage: 'Sorry, the service is currently under maintenance. Please try again later!',
|
prologueMessage: 'Sorry, the service is currently under maintenance. Please try again later!',
|
||||||
},
|
},
|
||||||
inputPlaceholder: {
|
inputPlaceholder: {
|
||||||
speaking: 'Speaking...',
|
speaking: 'Speaking',
|
||||||
recorderLoading: 'Transcribing...',
|
recorderLoading: 'Transcribing',
|
||||||
default: 'Type your question',
|
default: 'Type your question',
|
||||||
},
|
},
|
||||||
uploadFile: {
|
uploadFile: {
|
||||||
|
|
|
||||||
|
|
@ -131,19 +131,19 @@ function clearChat() {
|
||||||
paginationConfig.current_page = 1
|
paginationConfig.current_page = 1
|
||||||
paginationConfig.total = 0
|
paginationConfig.total = 0
|
||||||
currentRecordList.value = []
|
currentRecordList.value = []
|
||||||
getChatLog(applicationDetail.value.id)
|
getChatLog()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteLog(row: any) {
|
function deleteLog(row: any) {
|
||||||
chatAPI.deleteChat(row.id, left_loading).then(() => {
|
chatAPI.deleteChat(row.id).then(() => {
|
||||||
if (currentChatId.value === row.id) {
|
if (currentChatId.value === row.id) {
|
||||||
currentChatId.value = 'new'
|
currentChatId.value = 'new'
|
||||||
paginationConfig.current_page = 1
|
paginationConfig.current_page = 1
|
||||||
paginationConfig.total = 0
|
paginationConfig.total = 0
|
||||||
currentRecordList.value = []
|
currentRecordList.value = []
|
||||||
}
|
}
|
||||||
getChatLog(applicationDetail.value.id)
|
chatLogData.value = chatLogData.value.filter((item) => item.id !== row.id)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -139,19 +139,19 @@ function clearChat() {
|
||||||
paginationConfig.current_page = 1
|
paginationConfig.current_page = 1
|
||||||
paginationConfig.total = 0
|
paginationConfig.total = 0
|
||||||
currentRecordList.value = []
|
currentRecordList.value = []
|
||||||
getChatLog(applicationDetail.value.id)
|
getChatLog()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteLog(row: any) {
|
function deleteLog(row: any) {
|
||||||
chatAPI.deleteChat(row.id, left_loading).then(() => {
|
chatAPI.deleteChat(row.id).then(() => {
|
||||||
if (currentChatId.value === row.id) {
|
if (currentChatId.value === row.id) {
|
||||||
currentChatId.value = 'new'
|
currentChatId.value = 'new'
|
||||||
paginationConfig.current_page = 1
|
paginationConfig.current_page = 1
|
||||||
paginationConfig.total = 0
|
paginationConfig.total = 0
|
||||||
currentRecordList.value = []
|
currentRecordList.value = []
|
||||||
}
|
}
|
||||||
getChatLog(applicationDetail.value.id)
|
chatLogData.value = chatLogData.value.filter((item) => item.id !== row.id)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function handleScroll(event: any) {
|
function handleScroll(event: any) {
|
||||||
|
|
|
||||||
|
|
@ -233,12 +233,9 @@ import {useRoute, useRouter} from 'vue-router'
|
||||||
import ResetPassword from '@/layout/layout-header/avatar/ResetPassword.vue'
|
import ResetPassword from '@/layout/layout-header/avatar/ResetPassword.vue'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
import type { ResetCurrentUserPasswordRequest } from '@/api/type/user'
|
import type { ResetCurrentUserPasswordRequest } from '@/api/type/user'
|
||||||
import ExecutionDetailContent
|
import ExecutionDetailContent from '@/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue'
|
||||||
from '@/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue'
|
import ParagraphSourceContent from '@/components/ai-chat/component/knowledge-source-component/ParagraphSourceContent.vue'
|
||||||
import ParagraphSourceContent
|
import ParagraphDocumentContent from '@/components/ai-chat/component/knowledge-source-component/ParagraphDocumentContent.vue'
|
||||||
from '@/components/ai-chat/component/knowledge-source-component/ParagraphSourceContent.vue'
|
|
||||||
import ParagraphDocumentContent
|
|
||||||
from '@/components/ai-chat/component/knowledge-source-component/ParagraphDocumentContent.vue'
|
|
||||||
import HistoryPanel from '@/views/chat/component/HistoryPanel.vue'
|
import HistoryPanel from '@/views/chat/component/HistoryPanel.vue'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import { getFileUrl } from '@/utils/common'
|
import { getFileUrl } from '@/utils/common'
|
||||||
|
|
@ -307,8 +304,7 @@ const applicationDetail = computed({
|
||||||
get: () => {
|
get: () => {
|
||||||
return props.application_profile
|
return props.application_profile
|
||||||
},
|
},
|
||||||
set: (v) => {
|
set: (v) => {},
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const chatLogData = ref<any[]>([])
|
const chatLogData = ref<any[]>([])
|
||||||
|
|
@ -331,7 +327,7 @@ function refreshFieldTitle(chatId: string, abstract: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteLog(row: any) {
|
function deleteLog(row: any) {
|
||||||
chatAPI.deleteChat(row.id, left_loading).then(() => {
|
chatAPI.deleteChat(row.id).then(() => {
|
||||||
if (currentChatId.value === row.id) {
|
if (currentChatId.value === row.id) {
|
||||||
currentChatId.value = 'new'
|
currentChatId.value = 'new'
|
||||||
currentChatName.value = t('chat.createChat')
|
currentChatName.value = t('chat.createChat')
|
||||||
|
|
@ -339,7 +335,7 @@ function deleteLog(row: any) {
|
||||||
paginationConfig.value.total = 0
|
paginationConfig.value.total = 0
|
||||||
currentRecordList.value = []
|
currentRecordList.value = []
|
||||||
}
|
}
|
||||||
getChatLog()
|
chatLogData.value = chatLogData.value.filter((item) => item.id !== row.id)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@ const rules = reactive({
|
||||||
})
|
})
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
if (isEdit.value || !areAllValuesNonEmpty(form.value)) {
|
if (!areAllValuesNonEmpty(form.value)) {
|
||||||
visible.value = false
|
visible.value = false
|
||||||
} else {
|
} else {
|
||||||
MsgConfirm(t('common.tip'), t('views.tool.tip.saveMessage'), {
|
MsgConfirm(t('common.tip'), t('views.tool.tip.saveMessage'), {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue