Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-fe
Commits
64cb7700
Commit
64cb7700
authored
Dec 20, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'beta' into 'master'
fix: 应用提问追问生成异常处理 See merge request
!124
parents
4722af92
401f9204
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
63 additions
and
17 deletions
+63
-17
agent-preview.vue
...g/components/agent-config/agent-preview/agent-preview.vue
+16
-5
footer-input.vue
...ts/agent-config/agent-preview/components/footer-input.vue
+3
-0
message-list.vue
...ts/agent-config/agent-preview/components/message-list.vue
+4
-1
footer-input.vue
src/views/share/components/footer-input.vue
+4
-0
message-list.vue
src/views/share/components/message-list.vue
+4
-1
share-application-mobile.vue
src/views/share/share-application-mobile.vue
+16
-5
share-application-web.vue
src/views/share/share-application-web.vue
+16
-5
No files found.
src/views/personal-space/personal-app-setting/components/agent-config/agent-preview/agent-preview.vue
View file @
64cb7700
...
@@ -40,6 +40,8 @@ const currentPlayMessageItem = ref<ConversationMessageItem | null>(null)
...
@@ -40,6 +40,8 @@ const currentPlayMessageItem = ref<ConversationMessageItem | null>(null)
const
currentPlayAudioFragmentSerialNo
=
ref
(
0
)
const
currentPlayAudioFragmentSerialNo
=
ref
(
0
)
const
currentSoundCtl
=
shallowRef
<
Howl
|
null
>
(
null
)
const
currentSoundCtl
=
shallowRef
<
Howl
|
null
>
(
null
)
const
isSoundCtlCreated
=
ref
(
false
)
const
isSoundCtlCreated
=
ref
(
false
)
const
isAnswerResponseLoading
=
ref
(
false
)
const
createContinueQuestionsException
=
ref
(
false
)
const
isEnLanguage
=
computed
(()
=>
{
const
isEnLanguage
=
computed
(()
=>
{
return
systemLanguageStore
.
currentLanguageInfo
.
key
===
'en'
return
systemLanguageStore
.
currentLanguageInfo
.
key
===
'en'
...
@@ -107,12 +109,18 @@ function handleClearAllMessage() {
...
@@ -107,12 +109,18 @@ function handleClearAllMessage() {
}
}
async
function
handleCreateContinueQuestions
(
replyTextContent
:
string
)
{
async
function
handleCreateContinueQuestions
(
replyTextContent
:
string
)
{
c
onst
res
=
await
fetchCreateContinueQuestions
<
string
[]
>
({
input
:
replyTextContent
})
c
reateContinueQuestionsException
.
value
=
false
if
(
res
.
code
===
0
)
{
fetchCreateContinueQuestions
<
string
[]
>
({
input
:
replyTextContent
})
continuousQuestionList
.
value
=
res
.
data
.
then
((
res
)
=>
{
handleUpdatePageScroll
()
if
(
res
.
code
===
0
)
{
}
continuousQuestionList
.
value
=
res
.
data
handleUpdatePageScroll
()
}
})
.
catch
(()
=>
{
createContinueQuestionsException
.
value
=
true
})
}
}
function
handleUpdateContinueQuestionStatus
(
status
:
'default'
|
'close'
)
{
function
handleUpdateContinueQuestionStatus
(
status
:
'default'
|
'close'
)
{
...
@@ -316,6 +324,8 @@ function handleAudioPause(isClearMessageList = false) {
...
@@ -316,6 +324,8 @@ function handleAudioPause(isClearMessageList = false) {
:message-list=
"messageList"
:message-list=
"messageList"
:continuous-question-status=
"continuousQuestionStatus"
:continuous-question-status=
"continuousQuestionStatus"
:continuous-question-list=
"continuousQuestionList"
:continuous-question-list=
"continuousQuestionList"
:is-answer-response-loading=
"isAnswerResponseLoading"
:create-continue-questions-exception=
"createContinueQuestionsException"
@
audio-play=
"handleAudioPlay"
@
audio-play=
"handleAudioPlay"
@
audio-pause=
"handleAudioPause"
@
audio-pause=
"handleAudioPause"
/>
/>
...
@@ -324,6 +334,7 @@ function handleAudioPause(isClearMessageList = false) {
...
@@ -324,6 +334,7 @@ function handleAudioPause(isClearMessageList = false) {
<FooterInput
<FooterInput
ref=
"footerInputRef"
ref=
"footerInputRef"
v-model:is-answer-response-loading=
"isAnswerResponseLoading"
:continuous-question-status=
"continuousQuestionStatus"
:continuous-question-status=
"continuousQuestionStatus"
:message-list=
"messageList"
:message-list=
"messageList"
:answer-audio-auto-play=
"answerAudioAutoPlay"
:answer-audio-auto-play=
"answerAudioAutoPlay"
...
...
src/views/personal-space/personal-app-setting/components/agent-config/agent-preview/components/footer-input.vue
View file @
64cb7700
...
@@ -42,6 +42,7 @@ const userStore = useUserStore()
...
@@ -42,6 +42,7 @@ const userStore = useUserStore()
const
{
uploadFileList
,
handleLimitUpload
,
handleUpload
,
handleRemoveFile
}
=
useDialogueFile
()
const
{
uploadFileList
,
handleLimitUpload
,
handleUpload
,
handleRemoveFile
}
=
useDialogueFile
()
const
messageTipModalRef
=
useTemplateRef
<
InstanceType
<
typeof
OverwriteMessageTipModal
>>
(
'messageTipModalRef'
)
const
messageTipModalRef
=
useTemplateRef
<
InstanceType
<
typeof
OverwriteMessageTipModal
>>
(
'messageTipModalRef'
)
const
isAnswerResponseLoading
=
defineModel
<
boolean
>
(
'isAnswerResponseLoading'
,
{
required
:
true
})
const
emitter
=
inject
<
Emitter
<
MittEvents
>>
(
'emitter'
)
const
emitter
=
inject
<
Emitter
<
MittEvents
>>
(
'emitter'
)
...
@@ -184,6 +185,7 @@ function handleMessageSend() {
...
@@ -184,6 +185,7 @@ function handleMessageSend() {
})
})
})
})
isAnswerResponseLoading
.
value
=
true
inputMessageContent
.
value
=
''
inputMessageContent
.
value
=
''
isAnswerResponseWait
.
value
=
true
isAnswerResponseWait
.
value
=
true
...
@@ -263,6 +265,7 @@ function handleMessageSend() {
...
@@ -263,6 +265,7 @@ function handleMessageSend() {
},
},
onFinally
:
()
=>
{
onFinally
:
()
=>
{
controller
=
null
controller
=
null
isAnswerResponseLoading
.
value
=
false
userStore
.
fetchUpdateEquityInfo
()
userStore
.
fetchUpdateEquityInfo
()
},
},
})
})
...
...
src/views/personal-space/personal-app-setting/components/agent-config/agent-preview/components/message-list.vue
View file @
64cb7700
...
@@ -8,6 +8,8 @@ interface Props {
...
@@ -8,6 +8,8 @@ interface Props {
messageList
:
Map
<
string
,
ConversationMessageItem
>
messageList
:
Map
<
string
,
ConversationMessageItem
>
continuousQuestionStatus
:
'default'
|
'close'
continuousQuestionStatus
:
'default'
|
'close'
continuousQuestionList
:
string
[]
continuousQuestionList
:
string
[]
isAnswerResponseLoading
:
boolean
createContinueQuestionsException
:
boolean
}
}
const
props
=
defineProps
<
Props
>
()
const
props
=
defineProps
<
Props
>
()
...
@@ -23,7 +25,8 @@ const isShowContinueQuestion = computed(() => {
...
@@ -23,7 +25,8 @@ const isShowContinueQuestion = computed(() => {
return
(
return
(
props
.
continuousQuestionStatus
===
'default'
&&
props
.
continuousQuestionStatus
===
'default'
&&
props
.
messageList
.
size
>
1
&&
props
.
messageList
.
size
>
1
&&
!
Array
.
from
(
props
.
messageList
.
entries
()).
pop
()?.[
1
].
isAnswerResponseLoading
!
props
.
isAnswerResponseLoading
&&
!
props
.
createContinueQuestionsException
)
)
})
})
...
...
src/views/share/components/footer-input.vue
View file @
64cb7700
...
@@ -50,6 +50,8 @@ const userStore = useUserStore()
...
@@ -50,6 +50,8 @@ const userStore = useUserStore()
const
{
uploadFileList
,
handleLimitUpload
,
handleUpload
,
handleRemoveFile
}
=
useDialogueFile
()
const
{
uploadFileList
,
handleLimitUpload
,
handleUpload
,
handleRemoveFile
}
=
useDialogueFile
()
const
isAnswerResponseLoading
=
defineModel
<
boolean
>
(
'isAnswerResponseLoading'
,
{
required
:
true
})
const
emitter
=
inject
<
Emitter
<
MittEvents
>>
(
'emitter'
)
const
emitter
=
inject
<
Emitter
<
MittEvents
>>
(
'emitter'
)
const
inputMessageContent
=
ref
(
''
)
const
inputMessageContent
=
ref
(
''
)
...
@@ -175,6 +177,7 @@ function handleMessageSend() {
...
@@ -175,6 +177,7 @@ function handleMessageSend() {
const
input
=
inputMessageContent
.
value
const
input
=
inputMessageContent
.
value
let
replyTextContent
=
''
let
replyTextContent
=
''
isAnswerResponseLoading
.
value
=
true
isAnswerResponseWait
.
value
=
true
isAnswerResponseWait
.
value
=
true
inputMessageContent
.
value
=
''
inputMessageContent
.
value
=
''
currentReplyContentSentenceExtractIndex
.
value
=
0
currentReplyContentSentenceExtractIndex
.
value
=
0
...
@@ -239,6 +242,7 @@ function handleMessageSend() {
...
@@ -239,6 +242,7 @@ function handleMessageSend() {
},
},
onFinally
:
()
=>
{
onFinally
:
()
=>
{
controller
=
null
controller
=
null
isAnswerResponseLoading
.
value
=
false
userStore
.
fetchUpdateEquityInfo
()
userStore
.
fetchUpdateEquityInfo
()
},
},
})
})
...
...
src/views/share/components/message-list.vue
View file @
64cb7700
...
@@ -10,6 +10,8 @@ interface Props {
...
@@ -10,6 +10,8 @@ interface Props {
agentApplicationConfig
:
PersonalAppConfigState
agentApplicationConfig
:
PersonalAppConfigState
continuousQuestionStatus
:
'default'
|
'close'
continuousQuestionStatus
:
'default'
|
'close'
continuousQuestionList
:
string
[]
continuousQuestionList
:
string
[]
isAnswerResponseLoading
:
boolean
createContinueQuestionsException
:
boolean
}
}
const
props
=
defineProps
<
Props
>
()
const
props
=
defineProps
<
Props
>
()
...
@@ -25,7 +27,8 @@ const isShowContinueQuestion = computed(() => {
...
@@ -25,7 +27,8 @@ const isShowContinueQuestion = computed(() => {
return
(
return
(
props
.
continuousQuestionStatus
===
'default'
&&
props
.
continuousQuestionStatus
===
'default'
&&
props
.
messageList
.
size
>
1
&&
props
.
messageList
.
size
>
1
&&
!
Array
.
from
(
props
.
messageList
.
entries
()).
pop
()?.[
1
].
isAnswerResponseLoading
!
props
.
isAnswerResponseLoading
&&
!
props
.
createContinueQuestionsException
)
)
})
})
...
...
src/views/share/share-application-mobile.vue
View file @
64cb7700
...
@@ -48,6 +48,8 @@ const currentPlayMessageItem = ref<ConversationMessageItem | null>(null)
...
@@ -48,6 +48,8 @@ const currentPlayMessageItem = ref<ConversationMessageItem | null>(null)
const
currentPlayAudioFragmentSerialNo
=
ref
(
0
)
const
currentPlayAudioFragmentSerialNo
=
ref
(
0
)
const
currentSoundCtl
=
shallowRef
<
Howl
|
null
>
(
null
)
const
currentSoundCtl
=
shallowRef
<
Howl
|
null
>
(
null
)
const
isSoundCtlCreated
=
ref
(
false
)
const
isSoundCtlCreated
=
ref
(
false
)
const
isAnswerResponseLoading
=
ref
(
false
)
const
createContinueQuestionsException
=
ref
(
false
)
const
isEnableDocumentParse
=
computed
(()
=>
{
const
isEnableDocumentParse
=
computed
(()
=>
{
return
agentApplicationConfig
.
value
.
knowledgeConfig
.
isDocumentParsing
===
'Y'
return
agentApplicationConfig
.
value
.
knowledgeConfig
.
isDocumentParsing
===
'Y'
...
@@ -184,12 +186,18 @@ function handleClearAllMessage() {
...
@@ -184,12 +186,18 @@ function handleClearAllMessage() {
}
}
async
function
handleCreateContinueQuestions
(
replyTextContent
:
string
)
{
async
function
handleCreateContinueQuestions
(
replyTextContent
:
string
)
{
c
onst
res
=
await
fetchCreateContinueQuestions
<
string
[]
>
({
input
:
replyTextContent
})
c
reateContinueQuestionsException
.
value
=
false
if
(
res
.
code
===
0
)
{
fetchCreateContinueQuestions
<
string
[]
>
({
input
:
replyTextContent
})
continueQuestionList
.
value
=
res
.
data
.
then
((
res
)
=>
{
handleUpdatePageScroll
()
if
(
res
.
code
===
0
)
{
}
continueQuestionList
.
value
=
res
.
data
handleUpdatePageScroll
()
}
})
.
catch
(()
=>
{
createContinueQuestionsException
.
value
=
true
})
}
}
function
handleResetContinueQuestionList
()
{
function
handleResetContinueQuestionList
()
{
...
@@ -316,6 +324,8 @@ function handleAudioPause(isClearMessageList = false) {
...
@@ -316,6 +324,8 @@ function handleAudioPause(isClearMessageList = false) {
:message-list=
"messageList"
:message-list=
"messageList"
:continuous-question-status=
"continuousQuestionStatus"
:continuous-question-status=
"continuousQuestionStatus"
:continuous-question-list=
"continueQuestionList"
:continuous-question-list=
"continueQuestionList"
:is-answer-response-loading=
"isAnswerResponseLoading"
:create-continue-questions-exception=
"createContinueQuestionsException"
@
audio-play=
"handleAudioPlay"
@
audio-play=
"handleAudioPlay"
@
audio-pause=
"handleAudioPause"
@
audio-pause=
"handleAudioPause"
/>
/>
...
@@ -325,6 +335,7 @@ function handleAudioPause(isClearMessageList = false) {
...
@@ -325,6 +335,7 @@ function handleAudioPause(isClearMessageList = false) {
<div
class=
"footer-operation px-4"
>
<div
class=
"footer-operation px-4"
>
<FooterInput
<FooterInput
ref=
"footerInputRef"
ref=
"footerInputRef"
v-model:is-answer-response-loading=
"isAnswerResponseLoading"
:message-list=
"messageList"
:message-list=
"messageList"
:dialogs-id=
"dialogsId"
:dialogs-id=
"dialogsId"
:agent-id=
"agentApplicationConfig.baseInfo.agentId"
:agent-id=
"agentApplicationConfig.baseInfo.agentId"
...
...
src/views/share/share-application-web.vue
View file @
64cb7700
...
@@ -51,6 +51,8 @@ const currentPlayMessageItem = ref<ConversationMessageItem | null>(null)
...
@@ -51,6 +51,8 @@ const currentPlayMessageItem = ref<ConversationMessageItem | null>(null)
const
currentPlayAudioFragmentSerialNo
=
ref
(
0
)
const
currentPlayAudioFragmentSerialNo
=
ref
(
0
)
const
currentSoundCtl
=
shallowRef
<
Howl
|
null
>
(
null
)
const
currentSoundCtl
=
shallowRef
<
Howl
|
null
>
(
null
)
const
isSoundCtlCreated
=
ref
(
false
)
const
isSoundCtlCreated
=
ref
(
false
)
const
isAnswerResponseLoading
=
ref
(
false
)
const
createContinueQuestionsException
=
ref
(
false
)
const
isEnableDocumentParse
=
computed
(()
=>
{
const
isEnableDocumentParse
=
computed
(()
=>
{
return
agentApplicationConfig
.
value
.
knowledgeConfig
.
isDocumentParsing
===
'Y'
return
agentApplicationConfig
.
value
.
knowledgeConfig
.
isDocumentParsing
===
'Y'
...
@@ -205,12 +207,18 @@ function handleClearAllMessage() {
...
@@ -205,12 +207,18 @@ function handleClearAllMessage() {
}
}
async
function
handleCreateContinueQuestions
(
replyTextContent
:
string
)
{
async
function
handleCreateContinueQuestions
(
replyTextContent
:
string
)
{
c
onst
res
=
await
fetchCreateContinueQuestions
<
string
[]
>
({
input
:
replyTextContent
})
c
reateContinueQuestionsException
.
value
=
false
if
(
res
.
code
===
0
)
{
fetchCreateContinueQuestions
<
string
[]
>
({
input
:
replyTextContent
})
continueQuestionList
.
value
=
res
.
data
.
then
((
res
)
=>
{
handleUpdatePageScroll
()
if
(
res
.
code
===
0
)
{
}
continueQuestionList
.
value
=
res
.
data
handleUpdatePageScroll
()
}
})
.
catch
(()
=>
{
createContinueQuestionsException
.
value
=
true
})
}
}
function
handleResetContinueQuestionList
()
{
function
handleResetContinueQuestionList
()
{
...
@@ -339,6 +347,8 @@ function handleAudioPause(isClearMessageList = false) {
...
@@ -339,6 +347,8 @@ function handleAudioPause(isClearMessageList = false) {
:message-list=
"messageList"
:message-list=
"messageList"
:continuous-question-status=
"continuousQuestionStatus"
:continuous-question-status=
"continuousQuestionStatus"
:continuous-question-list=
"continueQuestionList"
:continuous-question-list=
"continueQuestionList"
:is-answer-response-loading=
"isAnswerResponseLoading"
:create-continue-questions-exception=
"createContinueQuestionsException"
@
audio-play=
"handleAudioPlay"
@
audio-play=
"handleAudioPlay"
@
audio-pause=
"handleAudioPause"
@
audio-pause=
"handleAudioPause"
/>
/>
...
@@ -348,6 +358,7 @@ function handleAudioPause(isClearMessageList = false) {
...
@@ -348,6 +358,7 @@ function handleAudioPause(isClearMessageList = false) {
<div
class=
"px-5"
>
<div
class=
"px-5"
>
<FooterInput
<FooterInput
ref=
"footerInputRef"
ref=
"footerInputRef"
v-model:is-answer-response-loading=
"isAnswerResponseLoading"
:message-list=
"messageList"
:message-list=
"messageList"
:dialogs-id=
"dialogsId"
:dialogs-id=
"dialogsId"
:agent-id=
"agentApplicationConfig.baseInfo.agentId"
:agent-id=
"agentApplicationConfig.baseInfo.agentId"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment