agent-zero/webui/components
Frederic Thomas 9b6be5214c
Fix TTS cleanText function to properly extract text from HTML
The cleanText() function was using broken regex patterns that resulted in
mangled HTML fragments being returned instead of clean text. This caused
TTS to only speak the last segment of responses.

Changes:
- Replace broken regex HTML parsing with DOMParser (browser native)
- Properly extract text content while preserving all readable text
- Replace <pre> and <code> tags with placeholder before text extraction
- Add fallback for edge cases where DOMParser might fail

Before: cleanText output was '</pre> distribution in version.</p>'
After: cleanText output is 'Linux Distribution...See code attached...version.'

Fixes #901

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 13:57:41 +00:00
..
_examples v0.9.5-pre cleanup, polishing, bugfixing 2025-08-25 09:59:44 +02:00
chat Fix TTS cleanText function to properly extract text from HTML 2026-01-14 13:57:41 +00:00
messages frontend components refactor cleanup 2025-10-24 11:42:07 +02:00
modals projects continued 2025-11-03 16:17:12 +01:00
notifications project finalizing, openrouter embeddings 2025-11-13 08:52:45 +01:00
projects Squashed commit of the following: 2025-11-13 09:00:10 +01:00
settings styles: css cleanup and fix for mobile mem-dashboard; projects css polishing 2025-11-02 00:26:13 +01:00
sidebar project finalizing, openrouter embeddings 2025-11-13 08:52:45 +01:00
welcome projects, contexts continued 2025-11-04 13:05:58 +01:00