diff --git a/apps/stage-web/src/components/Layouts/InteractiveArea.vue b/apps/stage-web/src/components/Layouts/InteractiveArea.vue index 6365e1ab3..343548d6a 100644 --- a/apps/stage-web/src/components/Layouts/InteractiveArea.vue +++ b/apps/stage-web/src/components/Layouts/InteractiveArea.vue @@ -17,6 +17,7 @@ const messageInput = ref('') const listening = ref(false) const tab = ref<'chat' | 'custom' | 'clothes'>('chat') const showMicrophoneSelect = ref(false) +const isComposing = ref(false) const providersStore = useProvidersStore() const { activeProvider, activeModel } = storeToRefs(useConsciousnessStore()) @@ -46,7 +47,7 @@ const { transcribe: generate, terminate } = useWhisper(WhisperWorker, { }) async function handleSend() { - if (!messageInput.value.trim()) { + if (!messageInput.value.trim() || isComposing.value) { return } @@ -224,6 +225,8 @@ onAfterSend(async () => { 'transition-colors-none placeholder:transition-colors-none': themeColorsHueDynamic, }" @submit="handleSend" + @compositionstart="isComposing = true" + @compositionend="isComposing = false" /> diff --git a/apps/stage-web/src/components/Layouts/MobileInteractiveArea.vue b/apps/stage-web/src/components/Layouts/MobileInteractiveArea.vue index 3bc54734e..c9f87c40b 100644 --- a/apps/stage-web/src/components/Layouts/MobileInteractiveArea.vue +++ b/apps/stage-web/src/components/Layouts/MobileInteractiveArea.vue @@ -12,6 +12,7 @@ import MobileChatHistory from '../Widgets/MobileChatHistory.vue' const messageInput = ref('') const listening = ref(false) +const isComposing = ref(false) const providersStore = useProvidersStore() const { activeProvider, activeModel } = storeToRefs(useConsciousnessStore()) @@ -23,7 +24,7 @@ const { send, onAfterSend } = useChatStore() const { t } = useI18n() async function handleSend() { - if (!messageInput.value.trim()) { + if (!messageInput.value.trim() || isComposing.value) { return } @@ -98,6 +99,8 @@ onMounted(() => { transition="all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out" :class="{ 'transition-colors-none placeholder:transition-colors-none': themeColorsHueDynamic }" @submit="handleSend" + @compositionstart="isComposing = true" + @compositionend="isComposing = false" />