Commit bf1925b0 authored by nick zheng's avatar nick zheng

Merge branch 'beta' into 'master'

fix: 移动端应用切换后台再进入追问一直loading问题

See merge request !194
parents d3082bd4 b71d5d1f
......@@ -55,6 +55,7 @@ const { uploadFileList, handleLimitUpload, handleUpload, handleRemoveFile } = us
const { uploadImageList, handleLimitUploadImage, handleUploadImage, handleRemoveUploadImage } = useUploadImage()
const isAnswerResponseWait = defineModel<boolean>('isAnswerResponseLoading', { required: true })
const isAnswerResponseInterrupt = defineModel<boolean>('isAnswerResponseInterrupt', { required: true })
const emitter = inject<Emitter<MittEvents>>('emitter')
......@@ -202,6 +203,7 @@ function handleMessageSend(lastQuestionContent?: string) {
let replyTextContent = ''
let reasoningContent = ''
isAnswerResponseWait.value = true
isAnswerResponseInterrupt.value = false
currentReplyContentSentenceExtractIndex.value = 0
sentenceFragmentSerialNo.value = 0
sentenceExtractCheckEnabled.value = false
......
......@@ -15,7 +15,7 @@ interface Props {
continuousQuestionList: string[]
isAnswerResponseLoading: boolean
createContinueQuestionsException: boolean
lastQuestionContent?: string
isAnswerResponseInterrupt?: boolean
}
const props = defineProps<Props>()
......@@ -39,7 +39,7 @@ const isShowContinueQuestion = computed(() => {
props.messageList.size > 1 &&
!props.isAnswerResponseLoading &&
!props.createContinueQuestionsException &&
!props.lastQuestionContent
!props.isAnswerResponseInterrupt
)
})
......
......@@ -77,6 +77,7 @@ const isSoundCtlCreated = ref(false)
const isAnswerResponseLoading = ref(false)
const createContinueQuestionsException = ref(false)
const lastQuestionContent = ref('') // 上一次提问内容
const isAnswerResponseInterrupt = ref(false) // 回答响应被中断
const isEnableDocumentParse = computed(() => {
return agentApplicationConfig.value.knowledgeConfig.isDocumentParsing === 'Y'
......@@ -350,6 +351,7 @@ function handleExitPage() {
lastQuestionContent.value = messageListArr[messageListArr.length - 2]?.textContent || ''
}
isAnswerResponseInterrupt.value = true
footerInputRef.value?.errorMessageResponse()
}
}
......@@ -388,7 +390,7 @@ function handleExitPage() {
:continuous-question-list="continueQuestionList"
:is-answer-response-loading="isAnswerResponseLoading"
:create-continue-questions-exception="createContinueQuestionsException"
:last-question-content="lastQuestionContent"
:is-answer-response-interrupt="isAnswerResponseInterrupt"
@audio-play="handleAudioPlay"
@audio-pause="handleAudioPause"
/>
......@@ -399,6 +401,7 @@ function handleExitPage() {
<FooterInput
ref="footerInputRef"
v-model:is-answer-response-loading="isAnswerResponseLoading"
v-model:is-answer-response-interrupt="isAnswerResponseInterrupt"
:message-list="messageList"
:dialogs-id="dialogsId"
:agent-id="agentApplicationConfig.baseInfo.agentId"
......
......@@ -54,6 +54,7 @@ const currentSoundCtl = shallowRef<Howl | null>(null)
const isSoundCtlCreated = ref(false)
const isAnswerResponseLoading = ref(false)
const createContinueQuestionsException = ref(false)
const isAnswerResponseInterrupt = ref(false) // 回答响应被中断
const isEnableDocumentParse = computed(() => {
return agentApplicationConfig.value.knowledgeConfig.isDocumentParsing === 'Y'
......@@ -364,6 +365,7 @@ function handleAudioPause(isClearMessageList = false) {
<FooterInput
ref="footerInputRef"
v-model:is-answer-response-loading="isAnswerResponseLoading"
v-model:is-answer-response-interrupt="isAnswerResponseInterrupt"
:message-list="messageList"
:dialogs-id="dialogsId"
:agent-id="agentApplicationConfig.baseInfo.agentId"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment