From b3d8bf963787f41a33a4f217ee669c6587d58353 Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Wed, 11 Dec 2024 14:04:48 +0800 Subject: [PATCH] feat: to composable --- README.md | 1 + cspell.config.yaml | 2 + packages/stage/package.json | 2 + packages/stage/src/auto-imports.d.ts | 2 + packages/stage/src/components/MainStage.vue | 83 +++++++-------------- packages/stage/src/composables/micvad.ts | 74 ++++++++++++++++++ pnpm-lock.yaml | 6 ++ 7 files changed, 113 insertions(+), 57 deletions(-) create mode 100644 packages/stage/src/composables/micvad.ts diff --git a/README.md b/README.md index 1ff698380..faae11b6e 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,4 @@ pnpm dev - [pixiv/ChatVRM](https://github.com/pixiv/ChatVRM) - [josephrocca/ChatVRM-js: A JS conversion/adaptation of parts of the ChatVRM (TypeScript) code for standalone use in OpenCharacters and elsewhere](https://github.com/josephrocca/ChatVRM-js) +- Design of UI and style was inspired by [Cookard](https://store.steampowered.com/app/2919650/Cookard/), [UNBEATABLE](https://store.steampowered.com/app/2240620/UNBEATABLE/), and [Sensei! I like you so much!](https://store.steampowered.com/app/2957700/_/), and artworks of [Ayame by Mercedes Bazan](https://dribbble.com/shots/22157656-Ayame) with [Wish by Mercedes Bazan](https://dribbble.com/shots/24501019-Wish) diff --git a/cspell.config.yaml b/cspell.config.yaml index cef164e95..0b080651f 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -23,6 +23,7 @@ words: - cubismmotionqueuemanager - cubismusermodel - cubismviewmatrix + - defu - demi - elevenlabs - gltf @@ -43,6 +44,7 @@ words: - nuxt - nuxtjs - ofetch + - onnx - onnxruntime - openai - pinia diff --git a/packages/stage/package.json b/packages/stage/package.json index 5b2546eae..eed5f7b07 100644 --- a/packages/stage/package.json +++ b/packages/stage/package.json @@ -42,9 +42,11 @@ "@unocss/reset": "^0.65.1", "@vueuse/core": "^12.0.0", "@vueuse/head": "^2.0.0", + "@vueuse/shared": "^12.0.0", "@xsai/model": "^0.0.19", "@xsai/shared-chat-completion": "^0.0.19", "@xsai/stream-text": "^0.0.19", + "defu": "^6.1.4", "nprogress": "^0.2.0", "ofetch": "^1.4.1", "onnxruntime-web": "^1.20.1", diff --git a/packages/stage/src/auto-imports.d.ts b/packages/stage/src/auto-imports.d.ts index 02faa2262..f2a213f7a 100644 --- a/packages/stage/src/auto-imports.d.ts +++ b/packages/stage/src/auto-imports.d.ts @@ -206,6 +206,7 @@ declare global { const useMemoize: typeof import('@vueuse/core')['useMemoize'] const useMemory: typeof import('@vueuse/core')['useMemory'] const useMessageContentQueue: typeof import('./composables/queues')['useMessageContentQueue'] + const useMicVAD: typeof import('./composables/micvad')['useMicVAD'] const useModel: typeof import('vue')['useModel'] const useMounted: typeof import('@vueuse/core')['useMounted'] const useMouse: typeof import('@vueuse/core')['useMouse'] @@ -514,6 +515,7 @@ declare module 'vue' { readonly useMemoize: UnwrapRef readonly useMemory: UnwrapRef readonly useMessageContentQueue: UnwrapRef + readonly useMicVAD: UnwrapRef readonly useModel: UnwrapRef readonly useMounted: UnwrapRef readonly useMouse: UnwrapRef diff --git a/packages/stage/src/components/MainStage.vue b/packages/stage/src/components/MainStage.vue index d7774a0d1..06551d092 100644 --- a/packages/stage/src/components/MainStage.vue +++ b/packages/stage/src/components/MainStage.vue @@ -1,7 +1,6 @@