Skip to content

Agent Zero AI framework

polishing

frdel37615c5a243a
diff --git a/webui/components/chat/speech/speech-store.js b/webui/components/chat/speech/speech-store.js
index 75537e43f..8e39fb423 100644
--- a/webui/components/chat/speech/speech-store.js
+++ b/webui/components/chat/speech/speech-store.js
@@ -460,6 +460,12 @@ const model = {
// Remove inline code ticks: `...`
text = text.replace(/`([^`]*)`/g, "$1"); // remove backticks but keep content
+ // Remove HTML tags and their content: <tag>content</tag>
+ text = text.replace(/<[a-zA-Z][a-zA-Z0-9]*>.*?<\/[a-zA-Z][a-zA-Z0-9]*>/gs, "");
+
+ // Remove self-closing HTML tags: <tag/>
+ text = text.replace(/<[a-zA-Z][a-zA-Z0-9]*(\/| [^>]*\/>)/g, "");
+
// Remove markdown links: [label](url) → label
text = text.replace(/\[([^\]]+)\]\([^\)]+\)/g, "$1");
diff --git a/webui/components/settings/speech/microphone-setting-store.js b/webui/components/settings/speech/microphone-setting-store.js
index 15e623f80..ddc45e4e0 100644
--- a/webui/components/settings/speech/microphone-setting-store.js
+++ b/webui/components/settings/speech/microphone-setting-store.js
@@ -26,7 +26,7 @@ const model = {
requestPermission() {
navigator.mediaDevices.getUserMedia({ audio: true });
- this.loadDevices();
+ setTimeout(() => this.loadDevices(), 1000);
},
async selectDevice(deviceId) {