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
8a2f44da
Commit
8a2f44da
authored
Mar 14, 2025
by
nick zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 对话结束时无标识符号进行转语音
parent
8846cb1a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
footer-input.vue
...ts/agent-config/agent-preview/components/footer-input.vue
+2
-1
footer-input.vue
src/views/share/components/footer-input.vue
+2
-1
No files found.
src/views/personal-space/personal-app-setting/components/agent-config/agent-preview/components/footer-input.vue
View file @
8a2f44da
...
@@ -374,7 +374,7 @@ function handleSelectImage(cb: () => void) {
...
@@ -374,7 +374,7 @@ function handleSelectImage(cb: () => void) {
}
}
function
sentenceExtract
(
messageId
:
string
)
{
function
sentenceExtract
(
messageId
:
string
)
{
const
symbolRegExp
=
/
[
。!?;.!?;
]
/g
const
symbolRegExp
=
/
[
。!?;.!?;
~
]
/g
let
sentenceDraft
=
assistantFullAnswerContent
.
value
let
sentenceDraft
=
assistantFullAnswerContent
.
value
.
replace
(
/
\s{5,}
/gi
,
''
)
.
replace
(
/
\s{5,}
/gi
,
''
)
.
slice
(
currentReplyContentSentenceExtractIndex
.
value
)
.
slice
(
currentReplyContentSentenceExtractIndex
.
value
)
...
@@ -421,6 +421,7 @@ function sentenceExtract(messageId: string) {
...
@@ -421,6 +421,7 @@ function sentenceExtract(messageId: string) {
}
}
if
(
matchResult
)
matchExtract
()
if
(
matchResult
)
matchExtract
()
else
if
(
!
isAnswerResponseWait
.
value
)
matchExtract
()
else
setTimeout
(()
=>
sentenceExtract
(
messageId
),
600
)
else
setTimeout
(()
=>
sentenceExtract
(
messageId
),
600
)
}
}
...
...
src/views/share/components/footer-input.vue
View file @
8a2f44da
...
@@ -336,7 +336,7 @@ function handleSelectImage(cb: () => void) {
...
@@ -336,7 +336,7 @@ function handleSelectImage(cb: () => void) {
}
}
function
sentenceExtract
(
messageId
:
string
)
{
function
sentenceExtract
(
messageId
:
string
)
{
const
symbolRegExp
=
/
[
。!?;.!?;
]
/g
const
symbolRegExp
=
/
[
。!?;.!?;
~
]
/g
let
sentenceDraft
=
assistantFullAnswerContent
.
value
let
sentenceDraft
=
assistantFullAnswerContent
.
value
.
replace
(
/
\s{5,}
/gi
,
''
)
.
replace
(
/
\s{5,}
/gi
,
''
)
.
slice
(
currentReplyContentSentenceExtractIndex
.
value
)
.
slice
(
currentReplyContentSentenceExtractIndex
.
value
)
...
@@ -383,6 +383,7 @@ function sentenceExtract(messageId: string) {
...
@@ -383,6 +383,7 @@ function sentenceExtract(messageId: string) {
}
}
if
(
matchResult
)
matchExtract
()
if
(
matchResult
)
matchExtract
()
else
if
(
!
isAnswerResponseWait
.
value
)
matchExtract
()
else
setTimeout
(()
=>
sentenceExtract
(
messageId
),
600
)
else
setTimeout
(()
=>
sentenceExtract
(
messageId
),
600
)
}
}
...
...
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