From a2948b1294aff4b2c99f19c91f7a1df2c26d0655 Mon Sep 17 00:00:00 2001 From: zoujing Date: Fri, 15 May 2026 12:52:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AF=AD=E9=9F=B3=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E7=9A=84=E5=85=BC=E5=AE=B9=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ChatMain/ChatInputArea/index.vue | 33 ++++++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/src/pages/ChatMain/ChatInputArea/index.vue b/src/pages/ChatMain/ChatInputArea/index.vue index 45a099c..6d8067a 100644 --- a/src/pages/ChatMain/ChatInputArea/index.vue +++ b/src/pages/ChatMain/ChatInputArea/index.vue @@ -4,7 +4,7 @@ @touchend="handleVoiceTouchEndFromContainer" @touchcancel="handleVoiceTouchEndFromContainer" > - + + + + 按住 说话 + + + + 按住 说话 + @@ -80,6 +94,11 @@ + + + + + { watchDogTimer = setTimeout(() => { watchDogTimer = null; console.warn("recording watchdog triggered, forcing UI reset"); - if (hasActiveVoiceRecognition()) { + if (speechProvider === "app" && hasActiveVoiceRecognition()) { stopActiveVoiceRecognition({ shouldSend: true }); return; } @@ -258,7 +284,7 @@ watch(inputMessage, (val) => { // 切换语音/文本模式 const toggleVoiceMode = () => { if (!isSpeechRecognitionSupported.value) return; - if (isVoiceMode.value) { + if (speechProvider === "app" && isVoiceMode.value) { stopActiveVoiceRecognition({ shouldSend: false }); } isVoiceMode.value = !isVoiceMode.value; @@ -395,6 +421,7 @@ const handleVoiceTouchEnd = () => { }; const handleVoiceTouchEndFromContainer = () => { + if (speechProvider !== "app") return; if (!hasActiveVoiceRecognition()) return; stopActiveVoiceRecognition({ shouldSend: true }); };