Skip to content

Commit 339e18d

Browse files
authored
fix: After trying voice playback three times and sending an error message, an error message pops up (#2772)
1 parent fb0fdb9 commit 339e18d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,9 @@ class AudioManage {
314314
.then(async (res: any) => {
315315
if (res.type === 'application/json') {
316316
const text = await res.text()
317-
MsgError(text)
317+
if (this.tryList[index] >= 3) {
318+
MsgError(text)
319+
}
318320
this.statusList[index] = AudioStatus.ERROR
319321
throw ''
320322
}
@@ -375,8 +377,9 @@ class AudioManage {
375377
.then(async (res: any) => {
376378
if (res.type === 'application/json') {
377379
const text = await res.text()
378-
MsgError(text)
379-
380+
if (this.tryList[index] >= 3) {
381+
MsgError(text)
382+
}
380383
throw ''
381384
}
382385
// 假设我们有一个 MP3 文件的字节数组

0 commit comments

Comments
 (0)