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
You need to sign in or sign up before continuing.
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
Show 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)
const
currentPlayAudioFragmentSerialNo
=
ref
(
0
)
const
currentSoundCtl
=
shallowRef
<
Howl
|
null
>
(
null
)
const
isSoundCtlCreated
=
ref
(
false
)
const
isAnswerResponseLoading
=
ref
(
false
)
const
createContinueQuestionsException
=
ref
(
false
)
const
isEnLanguage
=
computed
(()
=>
{
return
systemLanguageStore
.
currentLanguageInfo
.
key
===
'en'
...
...
@@ -107,12 +109,18 @@ function handleClearAllMessage() {
}
async
function
handleCreateContinueQuestions
(
replyTextContent
:
string
)
{
c
onst
res
=
await
fetchCreateContinueQuestions
<
string
[]
>
({
input
:
replyTextContent
})
c
reateContinueQuestionsException
.
value
=
false
fetchCreateContinueQuestions
<
string
[]
>
({
input
:
replyTextContent
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
continuousQuestionList
.
value
=
res
.
data
handleUpdatePageScroll
()
}
})
.
catch
(()
=>
{
createContinueQuestionsException
.
value
=
true
})
}
function
handleUpdateContinueQuestionStatus
(
status
:
'default'
|
'close'
)
{
...
...
@@ -316,6 +324,8 @@ function handleAudioPause(isClearMessageList = false) {
:message-list=
"messageList"
:continuous-question-status=
"continuousQuestionStatus"
:continuous-question-list=
"continuousQuestionList"
:is-answer-response-loading=
"isAnswerResponseLoading"
:create-continue-questions-exception=
"createContinueQuestionsException"
@
audio-play=
"handleAudioPlay"
@
audio-pause=
"handleAudioPause"
/>
...
...
@@ -324,6 +334,7 @@ function handleAudioPause(isClearMessageList = false) {
<FooterInput
ref=
"footerInputRef"
v-model:is-answer-response-loading=
"isAnswerResponseLoading"
:continuous-question-status=
"continuousQuestionStatus"
:message-list=
"messageList"
: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()
const
{
uploadFileList
,
handleLimitUpload
,
handleUpload
,
handleRemoveFile
}
=
useDialogueFile
()
const
messageTipModalRef
=
useTemplateRef
<
InstanceType
<
typeof
OverwriteMessageTipModal
>>
(
'messageTipModalRef'
)
const
isAnswerResponseLoading
=
defineModel
<
boolean
>
(
'isAnswerResponseLoading'
,
{
required
:
true
})
const
emitter
=
inject
<
Emitter
<
MittEvents
>>
(
'emitter'
)
...
...
@@ -184,6 +185,7 @@ function handleMessageSend() {
})
})
isAnswerResponseLoading
.
value
=
true
inputMessageContent
.
value
=
''
isAnswerResponseWait
.
value
=
true
...
...
@@ -263,6 +265,7 @@ function handleMessageSend() {
},
onFinally
:
()
=>
{
controller
=
null
isAnswerResponseLoading
.
value
=
false
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 {
messageList
:
Map
<
string
,
ConversationMessageItem
>
continuousQuestionStatus
:
'default'
|
'close'
continuousQuestionList
:
string
[]
isAnswerResponseLoading
:
boolean
createContinueQuestionsException
:
boolean
}
const
props
=
defineProps
<
Props
>
()
...
...
@@ -23,7 +25,8 @@ const isShowContinueQuestion = computed(() => {
return
(
props
.
continuousQuestionStatus
===
'default'
&&
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()
const
{
uploadFileList
,
handleLimitUpload
,
handleUpload
,
handleRemoveFile
}
=
useDialogueFile
()
const
isAnswerResponseLoading
=
defineModel
<
boolean
>
(
'isAnswerResponseLoading'
,
{
required
:
true
})
const
emitter
=
inject
<
Emitter
<
MittEvents
>>
(
'emitter'
)
const
inputMessageContent
=
ref
(
''
)
...
...
@@ -175,6 +177,7 @@ function handleMessageSend() {
const
input
=
inputMessageContent
.
value
let
replyTextContent
=
''
isAnswerResponseLoading
.
value
=
true
isAnswerResponseWait
.
value
=
true
inputMessageContent
.
value
=
''
currentReplyContentSentenceExtractIndex
.
value
=
0
...
...
@@ -239,6 +242,7 @@ function handleMessageSend() {
},
onFinally
:
()
=>
{
controller
=
null
isAnswerResponseLoading
.
value
=
false
userStore
.
fetchUpdateEquityInfo
()
},
})
...
...
src/views/share/components/message-list.vue
View file @
64cb7700
...
...
@@ -10,6 +10,8 @@ interface Props {
agentApplicationConfig
:
PersonalAppConfigState
continuousQuestionStatus
:
'default'
|
'close'
continuousQuestionList
:
string
[]
isAnswerResponseLoading
:
boolean
createContinueQuestionsException
:
boolean
}
const
props
=
defineProps
<
Props
>
()
...
...
@@ -25,7 +27,8 @@ const isShowContinueQuestion = computed(() => {
return
(
props
.
continuousQuestionStatus
===
'default'
&&
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)
const
currentPlayAudioFragmentSerialNo
=
ref
(
0
)
const
currentSoundCtl
=
shallowRef
<
Howl
|
null
>
(
null
)
const
isSoundCtlCreated
=
ref
(
false
)
const
isAnswerResponseLoading
=
ref
(
false
)
const
createContinueQuestionsException
=
ref
(
false
)
const
isEnableDocumentParse
=
computed
(()
=>
{
return
agentApplicationConfig
.
value
.
knowledgeConfig
.
isDocumentParsing
===
'Y'
...
...
@@ -184,12 +186,18 @@ function handleClearAllMessage() {
}
async
function
handleCreateContinueQuestions
(
replyTextContent
:
string
)
{
c
onst
res
=
await
fetchCreateContinueQuestions
<
string
[]
>
({
input
:
replyTextContent
})
c
reateContinueQuestionsException
.
value
=
false
fetchCreateContinueQuestions
<
string
[]
>
({
input
:
replyTextContent
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
continueQuestionList
.
value
=
res
.
data
handleUpdatePageScroll
()
}
})
.
catch
(()
=>
{
createContinueQuestionsException
.
value
=
true
})
}
function
handleResetContinueQuestionList
()
{
...
...
@@ -316,6 +324,8 @@ function handleAudioPause(isClearMessageList = false) {
:message-list=
"messageList"
:continuous-question-status=
"continuousQuestionStatus"
:continuous-question-list=
"continueQuestionList"
:is-answer-response-loading=
"isAnswerResponseLoading"
:create-continue-questions-exception=
"createContinueQuestionsException"
@
audio-play=
"handleAudioPlay"
@
audio-pause=
"handleAudioPause"
/>
...
...
@@ -325,6 +335,7 @@ function handleAudioPause(isClearMessageList = false) {
<div
class=
"footer-operation px-4"
>
<FooterInput
ref=
"footerInputRef"
v-model:is-answer-response-loading=
"isAnswerResponseLoading"
:message-list=
"messageList"
:dialogs-id=
"dialogsId"
: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)
const
currentPlayAudioFragmentSerialNo
=
ref
(
0
)
const
currentSoundCtl
=
shallowRef
<
Howl
|
null
>
(
null
)
const
isSoundCtlCreated
=
ref
(
false
)
const
isAnswerResponseLoading
=
ref
(
false
)
const
createContinueQuestionsException
=
ref
(
false
)
const
isEnableDocumentParse
=
computed
(()
=>
{
return
agentApplicationConfig
.
value
.
knowledgeConfig
.
isDocumentParsing
===
'Y'
...
...
@@ -205,12 +207,18 @@ function handleClearAllMessage() {
}
async
function
handleCreateContinueQuestions
(
replyTextContent
:
string
)
{
c
onst
res
=
await
fetchCreateContinueQuestions
<
string
[]
>
({
input
:
replyTextContent
})
c
reateContinueQuestionsException
.
value
=
false
fetchCreateContinueQuestions
<
string
[]
>
({
input
:
replyTextContent
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
continueQuestionList
.
value
=
res
.
data
handleUpdatePageScroll
()
}
})
.
catch
(()
=>
{
createContinueQuestionsException
.
value
=
true
})
}
function
handleResetContinueQuestionList
()
{
...
...
@@ -339,6 +347,8 @@ function handleAudioPause(isClearMessageList = false) {
:message-list=
"messageList"
:continuous-question-status=
"continuousQuestionStatus"
:continuous-question-list=
"continueQuestionList"
:is-answer-response-loading=
"isAnswerResponseLoading"
:create-continue-questions-exception=
"createContinueQuestionsException"
@
audio-play=
"handleAudioPlay"
@
audio-pause=
"handleAudioPause"
/>
...
...
@@ -348,6 +358,7 @@ function handleAudioPause(isClearMessageList = false) {
<div
class=
"px-5"
>
<FooterInput
ref=
"footerInputRef"
v-model:is-answer-response-loading=
"isAnswerResponseLoading"
:message-list=
"messageList"
:dialogs-id=
"dialogsId"
: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