Skip to content

Commit 71c63ad

Browse files
authored
fix: Remove video tags during AI conversation voice playback (#4562)
1 parent 4ffdb46 commit 71c63ad

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ function markdownToPlainText(md: string) {
219219
.replace(/`(.*?)`/g, '$1')
220220
// 移除代码块 ```code```
221221
.replace(/```[\s\S]*?```/g, '')
222+
// 移除video标签
223+
.replace(/<video>[\s\S]*?<\/video>/g, '')
222224
// 移除html标签
223225
.replace(/<[^>]+>/g, '')
224226
// 移除多余的换行符

0 commit comments

Comments
 (0)