style: lint
This commit is contained in:
+14
-13
@@ -10,19 +10,20 @@ export default antfu(
|
||||
'**/assets/live2d/models/**',
|
||||
'packages/stage-tamagotchi/out/**',
|
||||
'**/drizzle/**',
|
||||
'**/.astro/**',
|
||||
],
|
||||
// rules: {
|
||||
// 'import/order': [
|
||||
// 'error',
|
||||
// {
|
||||
// 'groups': [
|
||||
// ['type'],
|
||||
// ['builtin', 'external'],
|
||||
// ['parent', 'sibling', 'index'],
|
||||
// ],
|
||||
// 'newlines-between': 'always',
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
rules: {
|
||||
'import/order': [
|
||||
'error',
|
||||
{
|
||||
'groups': [
|
||||
['type'],
|
||||
['builtin', 'external'],
|
||||
['parent', 'sibling', 'index'],
|
||||
],
|
||||
'newlines-between': 'always',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import type { Plugin, ResolvedConfig } from 'vite'
|
||||
import type { License, SpaceConfiguration } from './types'
|
||||
|
||||
import { readFile } from 'node:fs/promises'
|
||||
import { join } from 'node:path'
|
||||
import { defu } from 'defu'
|
||||
|
||||
import grayMatter from 'gray-matter'
|
||||
|
||||
import { exists } from '../../utils/fs'
|
||||
import { licenseValues } from './types'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { TZDate } from '@date-fns/tz'
|
||||
import type { Field, StructRow } from 'apache-arrow'
|
||||
|
||||
import type { DataType } from './duckdb-types'
|
||||
|
||||
import { TZDateMini } from '@date-fns/tz'
|
||||
import { DataType as ArrowDataType, IntervalUnit, Struct, TimeUnit, util } from 'apache-arrow'
|
||||
import {
|
||||
@@ -20,8 +20,8 @@ import {
|
||||
setDay,
|
||||
transpose,
|
||||
} from 'date-fns'
|
||||
|
||||
import { trimEnd } from 'es-toolkit'
|
||||
|
||||
import { isNullOrUndefined, notNullOrUndefined } from './duckdb-common'
|
||||
import {
|
||||
isBooleanType,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import type { Dictionary, Field, Struct, StructRow, Vector } from 'apache-arrow'
|
||||
|
||||
import { DataType as ArrowDataType } from 'apache-arrow'
|
||||
|
||||
import { isNullOrUndefined } from './duckdb-common'
|
||||
|
||||
/** Data types used by ArrowJS. */
|
||||
|
||||
@@ -3,10 +3,8 @@ import type { DuckDBBundles } from '@duckdb/duckdb-wasm'
|
||||
|
||||
import ehMainWorker from '@duckdb/duckdb-wasm/dist/duckdb-browser-eh.worker.js?url'
|
||||
import ehMainModule from '@duckdb/duckdb-wasm/dist/duckdb-eh.wasm?url'
|
||||
|
||||
import mvpMainWorker from '@duckdb/duckdb-wasm/dist/duckdb-browser-mvp.worker.js?url'
|
||||
import mvpMainModule from '@duckdb/duckdb-wasm/dist/duckdb-mvp.wasm?url'
|
||||
|
||||
import coiMainModule from '@duckdb/duckdb-wasm/dist/duckdb-coi.wasm?url'
|
||||
import coiMainWorker from '@duckdb/duckdb-wasm/dist/duckdb-browser-coi.worker.js?url'
|
||||
import coiPthreadWorker from '@duckdb/duckdb-wasm/dist/duckdb-browser-coi.pthread.worker.js?url'
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import type { AsyncDuckDBConnection, DuckDBBundles, Logger } from '@duckdb/duckdb-wasm'
|
||||
|
||||
import { AsyncDuckDB, ConsoleLogger, selectBundle, VoidLogger } from '@duckdb/duckdb-wasm'
|
||||
import { defu } from 'defu'
|
||||
|
||||
import { getBundles } from './duckdb-default-bundles'
|
||||
|
||||
export type ConnectOptions = ConnectRequiredOptions & ConnectOptionalOptions
|
||||
|
||||
@@ -2,10 +2,11 @@ import type { DuckDBBundles, Logger } from '@duckdb/duckdb-wasm'
|
||||
import type { DrizzleConfig, RelationalSchemaConfig, TablesRelationalConfig } from 'drizzle-orm'
|
||||
import type { DuckDBWasmClient } from './dialect'
|
||||
import type { DuckDBWasmQueryResultHKT } from './session'
|
||||
import { ConsoleLogger } from '@duckdb/duckdb-wasm'
|
||||
|
||||
import { ConsoleLogger } from '@duckdb/duckdb-wasm'
|
||||
import { createTableRelationsHelpers, DefaultLogger, entityKind, extractTablesRelationalConfig, isConfig } from 'drizzle-orm'
|
||||
import { PgDatabase, PgDialect } from 'drizzle-orm/pg-core'
|
||||
|
||||
import { connect } from './dialect'
|
||||
import { DuckDBWasmSession } from './session'
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import type { DuckDBWasmClient } from './dialect'
|
||||
|
||||
import { entityKind, fillPlaceholders, NoopLogger } from 'drizzle-orm'
|
||||
import { PgPreparedQuery, PgSession, PgTransaction } from 'drizzle-orm/pg-core'
|
||||
|
||||
import { beginTransaction, mapColumnData, withSavepoint } from './dialect'
|
||||
|
||||
export type Row = Record<string, any>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { MessageEvent, MessageEventBufferRequest, MessageEventInfo, MessageEventLoad, MessageEventOutput, MessageEventStatus } from './libs/types'
|
||||
|
||||
import { TresCanvas } from '@tresjs/core'
|
||||
import { useWebWorker } from '@vueuse/core'
|
||||
import { ACESFilmicToneMapping, SRGBColorSpace } from 'three'
|
||||
@@ -7,7 +8,6 @@ import { onMounted, ref, watch } from 'vue'
|
||||
|
||||
import AnimatedMesh from './components/AnimatedMesh.vue'
|
||||
import BloomScene from './components/BloomScene.vue'
|
||||
|
||||
import { SAMPLE_RATE } from './constants'
|
||||
import ProcessorWorklet from './libs/processor?worker&url'
|
||||
import { MessageType } from './libs/types'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { Mesh } from 'three'
|
||||
|
||||
import { useRenderLoop } from '@tresjs/core'
|
||||
import { IcosahedronGeometry, ShaderMaterial } from 'three'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* eslint-disable no-restricted-globals */
|
||||
import type { AutomaticSpeechRecognitionPipeline, PreTrainedModel } from '@huggingface/transformers'
|
||||
import type { MessageEvent as InternalMessageEvent, MessageEventBufferRequest, MessageEventError, MessageEventInfo, MessageEventOutput, MessageEventStatus } from './types'
|
||||
|
||||
import { AutoModel, pipeline, Tensor } from '@huggingface/transformers'
|
||||
|
||||
import {
|
||||
|
||||
@@ -7,12 +7,8 @@
|
||||
"ESNext",
|
||||
"WebWorker"
|
||||
],
|
||||
"baseUrl": ".",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"paths": {
|
||||
"~/*": ["src/*"]
|
||||
},
|
||||
"resolveJsonModule": true,
|
||||
"types": [
|
||||
"vitest",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { defineConfig, mergeConfigs, presetWebFonts } from 'unocss'
|
||||
|
||||
import UnoCSSConfig from '../../uno.config'
|
||||
|
||||
export default defineConfig(mergeConfigs([
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { WebSocketEvent } from '@proj-airi/server-shared/types'
|
||||
import type { Peer } from 'crossws'
|
||||
import type { AuthenticatedPeer } from './types'
|
||||
|
||||
import { env } from 'node:process'
|
||||
import { Format, LogLevel, setGlobalFormat, setGlobalLogLevel, useLogg } from '@guiiai/logg'
|
||||
import { createApp, createRouter, defineWebSocketHandler } from 'h3'
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import type { WebSocketBaseEvent, WebSocketEvent, WebSocketEvents } from '@proj-airi/server-shared/types'
|
||||
import type { Blob } from 'node:buffer'
|
||||
|
||||
import WebSocket from 'crossws/websocket'
|
||||
import { defu } from 'defu'
|
||||
|
||||
import { sleep } from './utils'
|
||||
|
||||
export interface ClientOptions {
|
||||
|
||||
@@ -2,6 +2,7 @@ import { join } from 'node:path'
|
||||
import { env, platform } from 'node:process'
|
||||
import { electronApp, is, optimizer } from '@electron-toolkit/utils'
|
||||
import { app, BrowserWindow, dialog, ipcMain, Menu, shell } from 'electron'
|
||||
|
||||
import icon from '../../build/icon.png?asset'
|
||||
|
||||
function createWindow(): void {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useMarkdown } from '@proj-airi/stage-ui/composables'
|
||||
import { useChatStore } from '@proj-airi/stage-ui/stores'
|
||||
|
||||
import { useElementBounding, useScroll } from '@vueuse/core'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { nextTick, ref } from 'vue'
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { BasicTextarea } from '@proj-airi/stage-ui/components'
|
||||
|
||||
import { useMicVAD } from '@proj-airi/stage-ui/composables'
|
||||
// import { useAudioContext } from '../../stores/audio'
|
||||
import { useChatStore, useSettings } from '@proj-airi/stage-ui/stores'
|
||||
|
||||
// import { useDevicesList } from '@vueuse/core'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import TamagotchiChatHistory from './ChatHistory.vue'
|
||||
|
||||
const messageInput = ref('')
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createPinia } from 'pinia'
|
||||
import { createApp } from 'vue'
|
||||
import { createI18n } from 'vue-i18n'
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
|
||||
import { routes } from 'vue-router/auto-routes'
|
||||
|
||||
import App from './App.vue'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { WidgetStage } from '@proj-airi/stage-ui/components'
|
||||
import { ref } from 'vue'
|
||||
|
||||
import InteractiveArea from '../components/InteractiveArea.vue'
|
||||
|
||||
const dragDelay = ref(0)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import type { Voice } from '@proj-airi/stage-ui/constants'
|
||||
|
||||
import { voiceList } from '@proj-airi/stage-ui/constants'
|
||||
import { useLLM, useSettings } from '@proj-airi/stage-ui/stores'
|
||||
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
@@ -5,12 +5,11 @@
|
||||
],
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"baseUrl": ".",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"paths": {
|
||||
"@renderer/*": [
|
||||
"src/renderer/src/*"
|
||||
"./src/renderer/src/*"
|
||||
],
|
||||
"@proj-airi/stage-ui/*": [
|
||||
"../stage-ui/src/*"
|
||||
@@ -21,6 +20,7 @@
|
||||
"src/renderer/src/shims.ts",
|
||||
"src/renderer/src/**/*",
|
||||
"src/renderer/src/**/*.vue",
|
||||
"src/preload/*.d.ts"
|
||||
"src/preload/*.d.ts",
|
||||
"../stage-ui/src/**/*.ts" // REVIEW: why?
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts" generic="T extends any, O extends any">
|
||||
import type { CSSProperties } from 'vue'
|
||||
|
||||
import { nextTick, onMounted, ref } from 'vue'
|
||||
|
||||
const events = defineEmits<{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { watchEffect } from 'vue'
|
||||
|
||||
import TransitionVertical from './TransitionVertical.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { InternalModel } from 'pixi-live2d-display/cubism4'
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
import { Application } from '@pixi/app'
|
||||
import { extensions } from '@pixi/extensions'
|
||||
import { Ticker, TickerPlugin } from '@pixi/ticker'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
import {
|
||||
EmotionAngryMotionName,
|
||||
EmotionAwkwardMotionName,
|
||||
@@ -9,7 +10,6 @@ import {
|
||||
EmotionSurpriseMotionName,
|
||||
EmotionThinkMotionName,
|
||||
} from '../../constants/emotions'
|
||||
|
||||
import Live2DViewer from '../Live2D/Viewer.vue'
|
||||
import Screen from '../Screen.vue'
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { OrbitControls } from '@tresjs/cientos'
|
||||
import { TresCanvas } from '@tresjs/core'
|
||||
|
||||
import { ref } from 'vue'
|
||||
|
||||
import Collapsable from '../Collapsable.vue'
|
||||
import DataGuiRange from '../DataGui/Range.vue'
|
||||
import Screen from '../Screen.vue'
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import type { VRMCore } from '@pixiv/three-vrm-core'
|
||||
|
||||
import { VRMUtils } from '@pixiv/three-vrm'
|
||||
import { useLoop, useTresContext } from '@tresjs/core'
|
||||
import { AnimationMixer } from 'three'
|
||||
|
||||
import { onMounted, onUnmounted, ref, watch } from 'vue'
|
||||
|
||||
import { clipFromVRMAnimation, loadVRMAnimation, useBlink, useIdleEyeSaccades } from '../../composables/vrm/animation'
|
||||
import { loadVrm } from '../../composables/vrm/core'
|
||||
import { useVRMEmote } from '../../composables/vrm/expression'
|
||||
|
||||
@@ -16,7 +16,6 @@ import { EMOTION_EmotionMotionName_value, EMOTION_VRMExpressionName_value, Emoti
|
||||
import { useAudioContext, useSpeakingStore } from '../../stores/audio'
|
||||
import { useChatStore } from '../../stores/chat'
|
||||
import { useSettings } from '../../stores/settings'
|
||||
|
||||
import Live2DScene from '../Scenes/Live2D.vue'
|
||||
import VRMScene from '../Scenes/VRM.vue'
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { useLlmmarkerParser } from './llmmarkerParser'
|
||||
|
||||
describe('useLlmmarkerParser', async () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { RealTimeVADOptions } from '@ricky0123/vad-web'
|
||||
import type { MaybeRef } from '@vueuse/shared'
|
||||
|
||||
import { getDefaultRealTimeVADOptions, MicVAD } from '@ricky0123/vad-web'
|
||||
import { usePermission } from '@vueuse/core'
|
||||
import { tryOnMounted } from '@vueuse/shared'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
import { ref } from 'vue'
|
||||
|
||||
export interface HandlerContext<T> {
|
||||
|
||||
@@ -2,6 +2,7 @@ import type { Emotion } from '../constants/emotions'
|
||||
import type { UseQueueReturn } from './queue'
|
||||
|
||||
import { ref } from 'vue'
|
||||
|
||||
import { llmInferenceEndToken } from '../constants'
|
||||
import { EMOTION_VALUES } from '../constants/emotions'
|
||||
import { useQueue } from './queue'
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import type { VRMAnimation } from '@pixiv/three-vrm-animation'
|
||||
import type { VRMCore } from '@pixiv/three-vrm-core'
|
||||
|
||||
import { createVRMAnimationClip } from '@pixiv/three-vrm-animation'
|
||||
import { Object3D, Vector3 } from 'three'
|
||||
import { randFloat } from 'three/src/math/MathUtils.js'
|
||||
import { ref } from 'vue'
|
||||
|
||||
import { useVRMLoader } from './loader'
|
||||
|
||||
export interface GLTFUserdata extends Record<string, any> {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { VRMCore } from '@pixiv/three-vrm'
|
||||
import type { Object3D, Scene } from 'three'
|
||||
import { VRMUtils } from '@pixiv/three-vrm'
|
||||
|
||||
import { VRMUtils } from '@pixiv/three-vrm'
|
||||
import { VRMLookAtQuaternionProxy } from '@pixiv/three-vrm-animation'
|
||||
|
||||
import { useVRMLoader } from './loader'
|
||||
|
||||
interface GLTFUserdata extends Record<string, any> {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { VRMCore } from '@pixiv/three-vrm-core'
|
||||
|
||||
import { ref } from 'vue'
|
||||
|
||||
interface EmotionState {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { MessageEvents, MessageGenerate, ProgressMessageEvents } from '../libs/workers/types'
|
||||
|
||||
import { useWebWorker } from '@vueuse/core'
|
||||
import { defu } from 'defu'
|
||||
import { onUnmounted, ref, watch } from 'vue'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { SystemMessage } from '@xsai/shared-chat'
|
||||
|
||||
import { EMOTION_VALUES } from '../emotions'
|
||||
|
||||
function message(prefix: string, suffix: string) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Message } from '@xsai/shared-chat'
|
||||
|
||||
import { listModels } from '@xsai/model'
|
||||
import { streamText } from '@xsai/stream-text'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"DOM",
|
||||
"ESNext"
|
||||
],
|
||||
"baseUrl": ".",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"resolveJsonModule": true,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useAudioContext } from '@proj-airi/stage-ui/stores'
|
||||
import { useDark, useElementBounding } from '@vueuse/core'
|
||||
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
const containerRef = ref<HTMLDivElement>()
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import { BasicTextarea, TransitionVertical } from '@proj-airi/stage-ui/components'
|
||||
import { useMicVAD, useWhisper } from '@proj-airi/stage-ui/composables'
|
||||
|
||||
import WhisperWorker from '@proj-airi/stage-ui/libs/workers/worker?worker&url'
|
||||
import { useAudioContext, useChatStore, useSettings } from '@proj-airi/stage-ui/stores'
|
||||
import { useDevicesList } from '@vueuse/core'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { ref, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import { encodeWAVToBase64 } from '../../utils/binary'
|
||||
import ChatHistory from '../Widgets/ChatHistory.vue'
|
||||
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { BasicTextarea } from '@proj-airi/stage-ui/components'
|
||||
|
||||
import { useMicVAD } from '@proj-airi/stage-ui/composables'
|
||||
// import { useAudioContext } from '../../stores/audio'
|
||||
import { useChatStore, useSettings } from '@proj-airi/stage-ui/stores'
|
||||
|
||||
// import { useDevicesList } from '@vueuse/core'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { DrawerContent, DrawerOverlay, DrawerPortal, DrawerRoot, DrawerTrigger } from 'vaul-vue'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import MobileChatHistory from '../Widgets/MobileChatHistory.vue'
|
||||
import MobileSettings from '../Widgets/MobileSettings.vue'
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import type { Voice } from '@proj-airi/stage-ui/constants'
|
||||
|
||||
import { TransitionVertical } from '@proj-airi/stage-ui/components'
|
||||
import { voiceList } from '@proj-airi/stage-ui/constants'
|
||||
import { useLLM, useSettings } from '@proj-airi/stage-ui/stores'
|
||||
|
||||
import { useDark } from '@vueuse/core'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useMarkdown } from '@proj-airi/stage-ui/composables'
|
||||
import { useChatStore } from '@proj-airi/stage-ui/stores'
|
||||
|
||||
import { useElementBounding, useScroll } from '@vueuse/core'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { nextTick, ref } from 'vue'
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useMarkdown } from '@proj-airi/stage-ui/composables'
|
||||
import { useChatStore } from '@proj-airi/stage-ui/stores'
|
||||
|
||||
import { useElementBounding, useScroll } from '@vueuse/core'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { nextTick, ref } from 'vue'
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import type { Voice } from '@proj-airi/stage-ui/constants'
|
||||
|
||||
import { voiceList } from '@proj-airi/stage-ui/constants'
|
||||
import { useLLM, useSettings } from '@proj-airi/stage-ui/stores'
|
||||
import { useDark } from '@vueuse/core'
|
||||
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Router } from 'vue-router'
|
||||
|
||||
import { autoAnimatePlugin } from '@formkit/auto-animate/vue'
|
||||
import Tres from '@tresjs/core'
|
||||
import { MotionPlugin } from '@vueuse/motion'
|
||||
@@ -7,7 +8,6 @@ import { createPinia } from 'pinia'
|
||||
import { setupLayouts } from 'virtual:generated-layouts'
|
||||
import { createApp } from 'vue'
|
||||
import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
|
||||
|
||||
import { routes } from 'vue-router/auto-routes'
|
||||
|
||||
import App from './App.vue'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { WidgetStage } from '@proj-airi/stage-ui/components'
|
||||
|
||||
import { useDark } from '@vueuse/core'
|
||||
|
||||
import Cross from '../components/Backgrounds/Cross.vue'
|
||||
import AnimatedBackground from '../components/Layouts/AnimatedBackground.vue'
|
||||
import Header from '../components/Layouts/Header.vue'
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import BasicTextarea from '@proj-airi/stage-ui/components/BasicTextarea.vue'
|
||||
|
||||
// import { useQueue } from '../../../composables/queue'
|
||||
import { BasicTextarea } from '@proj-airi/stage-ui/components'
|
||||
import { useDelayMessageQueue } from '@proj-airi/stage-ui/composables'
|
||||
import { llmInferenceEndToken } from '@proj-airi/stage-ui/constants'
|
||||
import { ref } from 'vue'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { Emotion } from '@proj-airi/stage-ui/constants/emotions'
|
||||
|
||||
import BasicTextarea from '@proj-airi/stage-ui/components/BasicTextarea.vue'
|
||||
import { BasicTextarea } from '@proj-airi/stage-ui/components'
|
||||
import { useQueue } from '@proj-airi/stage-ui/composables/queue'
|
||||
import { useEmotionsMessageQueue } from '@proj-airi/stage-ui/composables/queues'
|
||||
import { llmInferenceEndToken } from '@proj-airi/stage-ui/constants'
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import BasicTextarea from '@proj-airi/stage-ui/components/BasicTextarea.vue'
|
||||
|
||||
import { BasicTextarea } from '@proj-airi/stage-ui/components'
|
||||
import { useQueue } from '@proj-airi/stage-ui/composables/queue'
|
||||
import { useMessageContentQueue } from '@proj-airi/stage-ui/composables/queues'
|
||||
import { llmInferenceEndToken } from '@proj-airi/stage-ui/constants'
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"DOM",
|
||||
"ESNext"
|
||||
],
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@proj-airi/stage-ui/*": [
|
||||
"../stage-ui/src/*"
|
||||
|
||||
@@ -2,7 +2,6 @@ import { Buffer } from 'node:buffer'
|
||||
import { cp, mkdir, writeFile } from 'node:fs/promises'
|
||||
import path, { join, resolve } from 'node:path'
|
||||
import { env } from 'node:process'
|
||||
|
||||
import VueI18n from '@intlify/unplugin-vue-i18n/vite'
|
||||
import { Download } from '@proj-airi/unplugin-download/vite'
|
||||
import { DownloadLive2DSDK } from '@proj-airi/unplugin-live2d-sdk/vite'
|
||||
@@ -16,11 +15,10 @@ import VueMacros from 'unplugin-vue-macros/vite'
|
||||
import VueRouter from 'unplugin-vue-router/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
import { VitePWA } from 'vite-plugin-pwa'
|
||||
|
||||
import VueDevTools from 'vite-plugin-vue-devtools'
|
||||
import Layouts from 'vite-plugin-vue-layouts'
|
||||
import { exists } from '../../scripts/fs'
|
||||
|
||||
import { exists } from '../../scripts/fs'
|
||||
import { appName } from './src/constants'
|
||||
|
||||
export default defineConfig({
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Plugin } from 'vite'
|
||||
|
||||
import { Buffer } from 'node:buffer'
|
||||
import { copyFile, mkdir, writeFile } from 'node:fs/promises'
|
||||
import { join, resolve } from 'node:path'
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import type { Buffer } from 'node:buffer'
|
||||
|
||||
import { createWriteStream, existsSync, mkdirSync } from 'node:fs'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fromBuffer } from 'yauzl'
|
||||
|
||||
import { noError, onError } from './errors'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Plugin } from 'vite'
|
||||
|
||||
import { Buffer } from 'node:buffer'
|
||||
import { copyFile, mkdir } from 'node:fs/promises'
|
||||
import { join, resolve } from 'node:path'
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import type { MessageEvents, ProgressMessageEvents } from './libs/types'
|
||||
import { useDevicesList, useScreenSafeArea, useUserMedia, useWebWorker } from '@vueuse/core'
|
||||
|
||||
import { useDevicesList, useScreenSafeArea, useUserMedia, useWebWorker } from '@vueuse/core'
|
||||
import { computed, onUnmounted, ref, watch, watchEffect } from 'vue'
|
||||
|
||||
import AudioVisualizer from './components/AudioVisualizer.vue'
|
||||
import Progress from './components/Progress.vue'
|
||||
import WhisperLanguageSelect from './components/WhisperLanguageSelect.vue'
|
||||
|
||||
@@ -7,12 +7,8 @@
|
||||
"ESNext",
|
||||
"WebWorker"
|
||||
],
|
||||
"baseUrl": ".",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"paths": {
|
||||
"~/*": ["src/*"]
|
||||
},
|
||||
"resolveJsonModule": true,
|
||||
"types": [
|
||||
"vitest",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { defineConfig, mergeConfigs, presetWebFonts } from 'unocss'
|
||||
|
||||
import UnoCSSConfig from '../../uno.config'
|
||||
|
||||
export default defineConfig(mergeConfigs([
|
||||
|
||||
@@ -10,6 +10,7 @@ import type {
|
||||
GuildMember,
|
||||
} from 'discord.js'
|
||||
import type { Readable } from 'node:stream'
|
||||
|
||||
import { Buffer } from 'node:buffer'
|
||||
import { EventEmitter } from 'node:events'
|
||||
import { pipeline } from 'node:stream'
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import type { PipelineType } from '@huggingface/transformers'
|
||||
import type { Buffer } from 'node:buffer'
|
||||
|
||||
import { env } from 'node:process'
|
||||
import { useLogg } from '@guiiai/logg'
|
||||
import { pipeline } from '@huggingface/transformers'
|
||||
import { generateTranscription } from '@xsai/generate-transcription'
|
||||
import { createOpenAI } from '@xsai/providers'
|
||||
|
||||
import wavefile from 'wavefile'
|
||||
|
||||
import { pcmToWav } from '../utils/audio'
|
||||
|
||||
export class WhisperLargeV3Pipeline {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Readable } from 'node:stream'
|
||||
|
||||
import { Buffer } from 'node:buffer'
|
||||
import { useLogg } from '@guiiai/logg'
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Buffer } from 'node:buffer'
|
||||
|
||||
import { DECODE_SAMPLE_RATE } from '../constants/audio'
|
||||
|
||||
export function pcmToWav(pcmBuffer: Buffer, sampleRate: number, numChannels: number): Uint8Array {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Buffer } from 'node:buffer'
|
||||
import { Transform } from 'node:stream'
|
||||
|
||||
import OpusScript from 'opusscript'
|
||||
|
||||
export class OpusDecoder extends Transform {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Logg } from '@guiiai/logg'
|
||||
import type { Message as LLMMessage } from '@xsai/shared-chat'
|
||||
|
||||
import type { Action, BotSelf, ExtendedContext } from '../../types'
|
||||
|
||||
import { env } from 'node:process'
|
||||
import { useLogg } from '@guiiai/logg'
|
||||
import { generateText } from '@xsai/generate-text'
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import type { Message, PhotoSize } from 'grammy/types'
|
||||
import type { BotSelf } from '../types'
|
||||
|
||||
import { Buffer } from 'node:buffer'
|
||||
import generateText from '@xsai/generate-text'
|
||||
import { message } from '@xsai/utils-chat'
|
||||
import Sharp from 'sharp'
|
||||
|
||||
import { findPhotosDescriptions, recordPhoto } from '../models'
|
||||
import { openAI } from './providers'
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import type { Message } from 'grammy/types'
|
||||
import type { BotSelf } from '../types'
|
||||
|
||||
import { Buffer } from 'node:buffer'
|
||||
import generateText from '@xsai/generate-text'
|
||||
import { message } from '@xsai/utils-chat'
|
||||
import Sharp from 'sharp'
|
||||
|
||||
import { findStickerDescription, recordSticker } from '../models'
|
||||
import { openAI } from './providers'
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { Message } from 'grammy/types'
|
||||
import type { chatMessagesTable } from '../db/schema'
|
||||
|
||||
import { findPhotoDescription } from './photos'
|
||||
import { findStickerDescription } from './stickers'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user