【优化】Chat 字体滚动,如果stream结束,开始加速

This commit is contained in:
cherishsince 2024-05-17 18:07:54 +08:00
parent 055abf62cd
commit a3c5d253b3

View File

@ -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)