File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
ui/src/components/ai-chat/component/operation-button Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ function removeFormRander(text: string) {
156156 return text
157157 .replace (' 你好,请先填写下面表单内容:' , ' ' )
158158 .replace (' 请先填写以下表单并点击提交按钮' , ' ' )
159- .replace (/ <[ ^ >] + > . *? <\/ [ ^ >] + > / gs , ' ' )
159+ .replace (/ <form_rander> [ \s\S ] *? <\/ form_rander> / g , ' ' )
160160 .replace (' 填写后请点击【提交】按钮进行提交。' , ' ' )
161161 .trim ()
162162}
@@ -165,10 +165,10 @@ const playAnswerText = (text: string) => {
165165 if (! text ) {
166166 text = ' 抱歉,没有查找到相关内容,请重新描述您的问题或提供更多信息。'
167167 }
168- // text 处理成纯文本
169- text = markdownToPlainText (text )
170168 // 移除表单渲染器
171169 text = removeFormRander (text )
170+ // text 处理成纯文本
171+ text = markdownToPlainText (text )
172172 // console.log(text)
173173 audioPlayerStatus .value = true
174174 if (props .tts_type === ' BROWSER' ) {
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ function removeFormRander(text: string) {
135135 return text
136136 .replace (' 你好,请先填写下面表单内容:' , ' ' )
137137 .replace (' 请先填写以下表单并点击提交按钮' , ' ' )
138- .replace (/ <[ ^ >] + > . *? <\/ [ ^ >] + > / gs , ' ' )
138+ .replace (/ <form_rander> [ \s\S ] *? <\/ form_rander> / g , ' ' )
139139 .replace (' 填写后请点击【提交】按钮进行提交。' , ' ' )
140140 .trim ()
141141}
@@ -145,11 +145,11 @@ const playAnswerText = (text: string) => {
145145 if (! text ) {
146146 text = ' 抱歉,没有查找到相关内容,请重新描述您的问题或提供更多信息。'
147147 }
148- // text 处理成纯文本
149- text = markdownToPlainText (text )
150148 // 移除表单渲染器
151149 text = removeFormRander (text )
152- console .log (text )
150+ // text 处理成纯文本
151+ text = markdownToPlainText (text )
152+ // console.log(text)
153153 audioPlayerStatus .value = true
154154 if (props .tts_type === ' BROWSER' ) {
155155 if (text !== utterance .value ?.text ) {
You can’t perform that action at this time.
0 commit comments