From 625802a4ef53ac916f34edbc7864b44b5ceb5d48 Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Sun, 13 Apr 2025 23:15:22 +0800 Subject: [PATCH] fix(stage-ui): microphone selector --- .../src/components/Layouts/InteractiveArea.vue | 18 ++++++++++++------ packages/stage-ui/src/stores/settings.ts | 8 +++++--- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/apps/stage-web/src/components/Layouts/InteractiveArea.vue b/apps/stage-web/src/components/Layouts/InteractiveArea.vue index 67a5a9467..80e99cbfc 100644 --- a/apps/stage-web/src/components/Layouts/InteractiveArea.vue +++ b/apps/stage-web/src/components/Layouts/InteractiveArea.vue @@ -22,7 +22,7 @@ const providersStore = useProvidersStore() const { activeProvider, activeModel } = storeToRefs(useConsciousnessStore()) const { themeColorsHueDynamic } = storeToRefs(useSettings()) -const { audioInputs } = useDevicesList({ constraints: { audio: true }, requestPermissions: true }) +const { audioInputs, ensurePermissions } = useDevicesList({ constraints: { audio: true } }) const { selectedAudioDevice, isAudioInputOn, selectedAudioDeviceId } = storeToRefs(useSettings()) const { send, onAfterSend } = useChatStore() const { messages } = storeToRefs(useChatStore()) @@ -128,6 +128,12 @@ watch(isAudioInputOn, async (value) => { } }) +watch(showMicrophoneSelect, async (value) => { + if (value) { + await ensurePermissions() + } +}) + onAfterSend(async () => { messageInput.value = '' }) @@ -225,7 +231,7 @@ onAfterSend(async () => { -
+