diff --git a/apps/playground-prompt-engineering/src/components/ChatSimulator.vue b/apps/playground-prompt-engineering/src/components/ChatSimulator.vue index 55184359..5175a362 100644 --- a/apps/playground-prompt-engineering/src/components/ChatSimulator.vue +++ b/apps/playground-prompt-engineering/src/components/ChatSimulator.vue @@ -331,6 +331,7 @@ watch(() => messages.value.length, () => { .line-clamp-2 { display: -webkit-box; + line-clamp: 2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } diff --git a/apps/stage-web/src/components/Layouts/InteractiveArea.vue b/apps/stage-web/src/components/Layouts/InteractiveArea.vue index ac805b47..ed4764fb 100644 --- a/apps/stage-web/src/components/Layouts/InteractiveArea.vue +++ b/apps/stage-web/src/components/Layouts/InteractiveArea.vue @@ -6,7 +6,7 @@ import WhisperWorker from '@proj-airi/stage-ui/libs/workers/worker?worker&url' import { toWAVBase64 } from '@proj-airi/audio' import { useMicVAD, useWhisper } from '@proj-airi/stage-ui/composables' import { useAudioContext, useChatStore, useConsciousnessStore, useProvidersStore, useSettings } from '@proj-airi/stage-ui/stores' -import { BasicTextarea, TransitionVertical } from '@proj-airi/ui' +import { BasicTextarea } from '@proj-airi/ui' import { useDevicesList } from '@vueuse/core' import { storeToRefs } from 'pinia' import { onMounted, ref, watch } from 'vue' @@ -24,8 +24,8 @@ const providersStore = useProvidersStore() const { activeProvider, activeModel } = storeToRefs(useConsciousnessStore()) const { themeColorsHueDynamic } = storeToRefs(useSettings()) -const { audioInputs, ensurePermissions } = useDevicesList({ constraints: { audio: true } }) -const { selectedAudioDevice, isAudioInputOn, selectedAudioDeviceId } = storeToRefs(useSettings()) +const { ensurePermissions } = useDevicesList({ constraints: { audio: true } }) +const { isAudioInputOn, selectedAudioDeviceId } = storeToRefs(useSettings()) const { send, onAfterSend, discoverToolsCompatibility } = useChatStore() const { messages } = storeToRefs(useChatStore()) const { audioContext } = useAudioContext() @@ -104,17 +104,6 @@ async function handleTranscription(buffer: ArrayBufferLike) { generate({ type: 'generate', data: { audio: audioBase64, language: 'en' } }) } -async function handleAudioInputChange(event: Event) { - const target = event.target as HTMLSelectElement - const found = audioInputs.value.find(d => d.deviceId === target.value) - if (!found) { - selectedAudioDevice.value = undefined - return - } - - selectedAudioDevice.value = found -} - watch(isAudioInputOn, async (value) => { if (value === 'false') { destroy() @@ -195,46 +184,5 @@ onAfterSend(async () => { - diff --git a/apps/stage-web/src/components/Layouts/InteractiveArea/Actions/ViewControls.vue b/apps/stage-web/src/components/Layouts/InteractiveArea/Actions/ViewControls.vue new file mode 100644 index 00000000..a03e2b9b --- /dev/null +++ b/apps/stage-web/src/components/Layouts/InteractiveArea/Actions/ViewControls.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/apps/stage-web/src/components/Layouts/MobileHeader.vue b/apps/stage-web/src/components/Layouts/MobileHeader.vue new file mode 100644 index 00000000..1664c0d7 --- /dev/null +++ b/apps/stage-web/src/components/Layouts/MobileHeader.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/stage-web/src/components/Layouts/MobileInteractiveArea.vue b/apps/stage-web/src/components/Layouts/MobileInteractiveArea.vue index b359c11c..f92311cf 100644 --- a/apps/stage-web/src/components/Layouts/MobileInteractiveArea.vue +++ b/apps/stage-web/src/components/Layouts/MobileInteractiveArea.vue @@ -4,11 +4,20 @@ import type { ChatProvider } from '@xsai-ext/shared-providers' import { useMicVAD } from '@proj-airi/stage-ui/composables' import { useChatStore, useConsciousnessStore, useProvidersStore, useSettings } from '@proj-airi/stage-ui/stores' import { BasicTextarea } from '@proj-airi/ui' +import { useDark } from '@vueuse/core' import { storeToRefs } from 'pinia' -import { onMounted, ref, watch } from 'vue' +import { onMounted, ref, useTemplateRef, watch } from 'vue' import { useI18n } from 'vue-i18n' +import { RouterLink } from 'vue-router' import MobileChatHistory from '../Widgets/MobileChatHistory.vue' +import ActionViewControls from './InteractiveArea/Actions/ViewControls.vue' +import ViewControlInputs from './ViewControls/Inputs.vue' + +const isDark = useDark({ disableTransition: false }) + +const viewControlsActiveMode = ref<'x' | 'y' | 'z' | 'scale'>('scale') +const viewControlsInputsRef = useTemplateRef>('viewControlsInputs') const messageInput = ref('') const listening = ref(false) @@ -19,7 +28,7 @@ const { activeProvider, activeModel } = storeToRefs(useConsciousnessStore()) // const { audioInputs } = useDevicesList({ constraints: { audio: true }, requestPermissions: true }) // const { selectedAudioDevice, isAudioInputOn, selectedAudioDeviceId } = storeToRefs(useSettings()) -const { isAudioInputOn, selectedAudioDeviceId, themeColorsHueDynamic } = storeToRefs(useSettings()) +const { isAudioInputOn, selectedAudioDeviceId, themeColorsHueDynamic, stageView, stageViewControlsEnabled } = storeToRefs(useSettings()) const { send, onAfterSend, discoverToolsCompatibility } = useChatStore() const { messages } = storeToRefs(useChatStore()) const { t } = useI18n() @@ -100,34 +109,75 @@ onMounted(() => { diff --git a/apps/stage-web/src/components/Layouts/ViewControls/Inputs.vue b/apps/stage-web/src/components/Layouts/ViewControls/Inputs.vue new file mode 100644 index 00000000..89d9fb5a --- /dev/null +++ b/apps/stage-web/src/components/Layouts/ViewControls/Inputs.vue @@ -0,0 +1,203 @@ + + + + + diff --git a/apps/stage-web/src/components/Widgets/ChatHistory.vue b/apps/stage-web/src/components/Widgets/ChatHistory.vue index 3c64e5c7..cd370b49 100644 --- a/apps/stage-web/src/components/Widgets/ChatHistory.vue +++ b/apps/stage-web/src/components/Widgets/ChatHistory.vue @@ -1,7 +1,6 @@ diff --git a/apps/stage-web/src/components/Widgets/MobileChatHistory.vue b/apps/stage-web/src/components/Widgets/MobileChatHistory.vue index 96440d85..5e5515c1 100644 --- a/apps/stage-web/src/components/Widgets/MobileChatHistory.vue +++ b/apps/stage-web/src/components/Widgets/MobileChatHistory.vue @@ -1,7 +1,6 @@