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:
@@ -32,8 +32,11 @@
|
||||
panel.innerHTML = `
|
||||
<div class="chat-header">
|
||||
<h3>Asistente IA — Buscar partes</h3>
|
||||
<div class="chat-header-actions">
|
||||
${hasTTS ? '<button class="chat-tts-toggle" id="chatTtsToggle" aria-label="Activar lectura de respuestas" title="Activar lectura de respuestas">🔊</button>' : ''}
|
||||
<button class="chat-header-close" id="chatClose" aria-label="Cerrar">×</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>
|
||||
<div class="chat-typing" id="chatTyping">
|
||||
|
||||
2
pos/static/js/chat.min.js
vendored
2
pos/static/js/chat.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user