From 9e5bc89d93318f4a81064a87aebd66e6869ec6ef Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Mon, 10 Nov 2025 06:19:15 -0500 Subject: [PATCH] Remove TTS download button debugging logs Download button functionality is now confirmed working - removed all debugging console logs. --- public/src/uncloseai-embed-modal.js | 46 ----------------------------- 1 file changed, 46 deletions(-) diff --git a/public/src/uncloseai-embed-modal.js b/public/src/uncloseai-embed-modal.js index 2ff6314..acea3fe 100644 --- a/public/src/uncloseai-embed-modal.js +++ b/public/src/uncloseai-embed-modal.js @@ -1006,7 +1006,6 @@ async function openUncloseaiEmbeddedModalNew() { userTtsBtn.onclick = async () => { const modalVoiceSelect = document.getElementById("hermes-voice-select"); const selectedVoice = modalVoiceSelect?.value || "tts-1:alloy"; - console.log("🔊 USER TTS: Selected voice:", selectedVoice); // If audio is already playing, pause it if (userAudio && !userAudio.paused) { @@ -1035,19 +1034,10 @@ async function openUncloseaiEmbeddedModalNew() { const result = await speakChatText(message, selectedVoice, 1.0); userAudio = result.audio; - console.log("🔊 USER TTS: Audio generated successfully"); - console.log("🔊 USER TTS: result object:", result); - console.log("🔊 USER TTS: blobUrl:", result.blobUrl); - // Show and set up the download button const downloadBtn = userMessageActions.querySelector('.uncloseai-download-btn'); - console.log("🔊 USER TTS: Download button found:", !!downloadBtn); - if (downloadBtn) { downloadBtn.style.display = ""; // Show the button - console.log("🔊 USER TTS: Download button display set to visible"); - console.log("🔊 USER TTS: Download button computed style:", window.getComputedStyle(downloadBtn).display); - downloadBtn.onclick = async () => { try { const { generateTitleForTTS } = await import("./tts.js"); @@ -1064,8 +1054,6 @@ async function openUncloseaiEmbeddedModalNew() { a.click(); } }; - } else { - console.error("🔊 USER TTS: Download button NOT FOUND in userMessageActions!"); } // Set up audio event handlers @@ -1202,7 +1190,6 @@ async function openUncloseaiEmbeddedModalNew() { // Find voice selection from the modal by ID const modalVoiceSelect = document.getElementById("hermes-voice-select"); const selectedVoice = modalVoiceSelect?.value || "tts-1:alloy"; - console.log("🔊 AI TTS: Selected voice:", selectedVoice); // If audio is already playing, pause it if (currentAudio && !currentAudio.paused) { @@ -1237,19 +1224,10 @@ async function openUncloseaiEmbeddedModalNew() { const result = await speakChatText(response, selectedVoice, 1.0); currentAudio = result.audio; - console.log("🔊 AI TTS: Audio generated successfully"); - console.log("🔊 AI TTS: result object:", result); - console.log("🔊 AI TTS: blobUrl:", result.blobUrl); - // Show and set up the download button const downloadBtn = messageActions.querySelector('.uncloseai-download-btn'); - console.log("🔊 AI TTS: Download button found:", !!downloadBtn); - if (downloadBtn) { downloadBtn.style.display = ""; // Show the button - console.log("🔊 AI TTS: Download button display set to visible"); - console.log("🔊 AI TTS: Download button computed style:", window.getComputedStyle(downloadBtn).display); - downloadBtn.onclick = async () => { try { const { generateTitleForTTS } = await import("./tts.js"); @@ -1266,8 +1244,6 @@ async function openUncloseaiEmbeddedModalNew() { a.click(); } }; - } else { - console.error("🔊 AI TTS: Download button NOT FOUND in messageActions!"); } // Set up audio event handlers @@ -1585,19 +1561,10 @@ You have complete knowledge of this page content and can reference any details, ); historicalUserAudio = result.audio; - console.log("🔊 HISTORICAL USER TTS: Audio generated successfully"); - console.log("🔊 HISTORICAL USER TTS: result object:", result); - console.log("🔊 HISTORICAL USER TTS: blobUrl:", result.blobUrl); - // Show and set up the download button const downloadBtn = userMessageActions.querySelector('.uncloseai-download-btn'); - console.log("🔊 HISTORICAL USER TTS: Download button found:", !!downloadBtn); - if (downloadBtn) { downloadBtn.style.display = ""; // Show the button - console.log("🔊 HISTORICAL USER TTS: Download button display set to visible"); - console.log("🔊 HISTORICAL USER TTS: Download button computed style:", window.getComputedStyle(downloadBtn).display); - downloadBtn.onclick = async () => { try { const { generateTitleForTTS } = await import("./tts.js"); @@ -1614,8 +1581,6 @@ You have complete knowledge of this page content and can reference any details, a.click(); } }; - } else { - console.error("🔊 HISTORICAL USER TTS: Download button NOT FOUND in userMessageActions!"); } // Set up audio event handlers @@ -1754,19 +1719,10 @@ You have complete knowledge of this page content and can reference any details, ); historicalAudio = result.audio; - console.log("🔊 HISTORICAL AI TTS: Audio generated successfully"); - console.log("🔊 HISTORICAL AI TTS: result object:", result); - console.log("🔊 HISTORICAL AI TTS: blobUrl:", result.blobUrl); - // Show and set up the download button const downloadBtn = messageActions.querySelector('.uncloseai-download-btn'); - console.log("🔊 HISTORICAL AI TTS: Download button found:", !!downloadBtn); - if (downloadBtn) { downloadBtn.style.display = ""; // Show the button - console.log("🔊 HISTORICAL AI TTS: Download button display set to visible"); - console.log("🔊 HISTORICAL AI TTS: Download button computed style:", window.getComputedStyle(downloadBtn).display); - downloadBtn.onclick = async () => { try { const { generateTitleForTTS } = await import("./tts.js"); @@ -1783,8 +1739,6 @@ You have complete knowledge of this page content and can reference any details, a.click(); } }; - } else { - console.error("🔊 HISTORICAL AI TTS: Download button NOT FOUND in messageActions!"); } // Set up audio event handlers