added visual waiting steps
All checks were successful
Deploy FluentGerman.ai / deploy (push) Successful in 52s

This commit is contained in:
2026-02-18 12:47:58 +01:00
parent 557b7c28aa
commit 829238dd2f
2 changed files with 7 additions and 5 deletions

View File

@@ -160,7 +160,6 @@ document.addEventListener('DOMContentLoaded', async () => {
const text = inputEl.value.trim();
if (!text) return;
const wasVoice = voice.lastInputWasVoice;
voice.lastInputWasVoice = false;
inputEl.value = '';
@@ -169,7 +168,7 @@ document.addEventListener('DOMContentLoaded', async () => {
appendMessage('user', text);
history.push({ role: 'user', content: text });
const assistantEl = appendMessage('assistant', '');
const assistantEl = appendMessage('assistant', voiceModeOn ? 'Thinking...' : '');
let fullResponse = '';
try {
@@ -188,9 +187,7 @@ document.addEventListener('DOMContentLoaded', async () => {
// Special handling for Voice Mode: Buffer text, wait for TTS, then show & play
if (voiceModeOn) {
// Show thinking state
assistantEl.innerHTML = '<span class="thinking-dots">Thinking<span>.</span><span>.</span><span>.</span></span>';
assistantEl.classList.add('message-thinking');
// "Thinking..." is already shown from appendMessage above
while (true) {
const { done, value } = await reader.read();