From 43d38249d33079c6fae5dbf263881221170cd502 Mon Sep 17 00:00:00 2001 From: DDMeaqua Date: Sat, 12 Oct 2024 19:44:54 +0800 Subject: [PATCH] chore: wip --- app/components/chat.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 317343574..83d3f1552 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -575,16 +575,18 @@ export function ChatActions(props: { if (speechApi) { await speechApi.start(); setIsListening(true); + document.getElementById("chat-input")?.focus(); } }; const stopListening = async () => { + showToast(Locale.Chat.CloseSpeak); if (speechApi) { if (config.sttConfig.engine !== DEFAULT_STT_ENGINE) setIsTranscription(true); await speechApi.stop(); setIsListening(false); } - showToast(Locale.Chat.CloseSpeak); + document.getElementById("chat-input")?.focus(); }; const onRecognitionEnd = (finalTranscript: string) => { console.log(finalTranscript);