From 641dc51699bdee02909b09cdbdd124a2cdb3be26 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Sun, 11 May 2025 19:49:51 +1000 Subject: [PATCH] SpeechToText js simplify error feedback to console.error --- aider/gui_speech_to_text.js | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/aider/gui_speech_to_text.js b/aider/gui_speech_to_text.js index 009a0b993..2ef85aeb0 100644 --- a/aider/gui_speech_to_text.js +++ b/aider/gui_speech_to_text.js @@ -96,7 +96,7 @@ // Setup button click handler button.addEventListener('click', function() { - led.style.backgroundColor = 'green'; + led.style.backgroundColor = 'lime'; recognition.start(); }); @@ -106,22 +106,8 @@ // Try to populate the chat input directly const success = populateChatInput(transcript); - - if (!success) { + if (!success) console.error('populateChatInput failed'); - - // Add a debug display with the transcribed text - const debugContainer = document.createElement('div'); - debugContainer.style.padding = '10px'; - debugContainer.style.marginTop = '10px'; - debugContainer.style.backgroundColor = '#ffeeee'; - debugContainer.style.border = '1px solid #ffcccc'; - debugContainer.innerHTML = ` -
Debug: Transcribed text
-
- `; - container.appendChild(debugContainer); - } }; recognition.onerror = function(event) {