Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a3c5d253
authored
May 17, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【优化】Chat 字体滚动,如果stream结束,开始加速
parent
055abf62
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
src/views/ai/chat/index.vue
+6
-1
No files found.
src/views/ai/chat/index.vue
View file @
a3c5d253
...
...
@@ -124,8 +124,9 @@ const textRoll = async () => {
if
(
textRoleRunning
.
value
)
{
return
}
// 设置状态
textRoleRunning
.
value
=
true
displayedText
.
value
=
''
const
task
=
async
()
=>
{
// 调整速度
const
diff
=
(
fullText
.
value
.
length
-
displayedText
.
value
.
length
)
/
10
...
...
@@ -138,6 +139,10 @@ const textRoll = async () => {
}
else
{
textSpeed
.
value
=
100
}
// 对话结束,就按30的速度
if
(
!
conversationInProgress
.
value
)
{
textSpeed
.
value
=
30
}
console
.
log
(
`diff
${
diff
}
速度
${
textSpeed
.
value
}
`
)
// console.log('index
<
fullText
.
value
.
length
'
,
index
<
fullText
.
value
.
length
,
conversationInProgress
.
value
)
...
...
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