fix(chat): add missing chatTtsToggle button to prevent null reference error

The chat.js init() template did not include #chatTtsToggle, causing
a runtime TypeError when hasTTS was true. Added the toggle button
inside .chat-header-actions, matching chat-public.js structure.
Regenerated chat.min.js.
This commit is contained in:
2026-04-29 06:30:13 +00:00
parent f24f25e74e
commit 44c3a6c910
2 changed files with 5 additions and 2 deletions

View File

@@ -32,7 +32,10 @@
panel.innerHTML = `
<div class="chat-header">
<h3>Asistente IA — Buscar partes</h3>
<button class="chat-header-close" id="chatClose" aria-label="Cerrar">&times;</button>
<div class="chat-header-actions">
${hasTTS ? '<button class="chat-tts-toggle" id="chatTtsToggle" aria-label="Activar lectura de respuestas" title="Activar lectura de respuestas">&#128266;</button>' : ''}
<button class="chat-header-close" id="chatClose" aria-label="Cerrar">&times;</button>
</div>
</div>
<div class="chat-messages" id="chatMessages">
<div class="chat-msg ai">Hola, soy el asistente de Nexus. Dime que refaccion necesitas y te ayudo a encontrarla.</div>

File diff suppressed because one or more lines are too long