polishing
frdel committed
Jul 14, 2025 at 23:19 UTC
37615c5a243af31a8121872628e57eceb8bb772e
2 files changed
+7
-1
webui/components/chat/speech/speech-store.js
+6
@@ -460,6 +460,12 @@ const model = {
460
// Remove inline code ticks: `...`
461
text = text.replace(/`([^`]*)`/g, "$1"); // remove backticks but keep content
462
463
+ // Remove HTML tags and their content: <tag>content</tag>
464
+ text = text.replace(/<[a-zA-Z][a-zA-Z0-9]*>.*?<\/[a-zA-Z][a-zA-Z0-9]*>/gs, "");
465
+
466
+ // Remove self-closing HTML tags: <tag/>
467
+ text = text.replace(/<[a-zA-Z][a-zA-Z0-9]*(\/| [^>]*\/>)/g, "");
468
+
469
// Remove markdown links: [label](url) → label
470
text = text.replace(/\[([^\]]+)\]\([^\)]+\)/g, "$1");
471
webui/components/settings/speech/microphone-setting-store.js
+1
-1
@@ -26,7 +26,7 @@ const model = {
26
27
requestPermission() {
28
navigator.mediaDevices.getUserMedia({ audio: true });
29
- this.loadDevices();
29
+ setTimeout(() => this.loadDevices(), 1000);
30
},
31
32
async selectDevice(deviceId) {