diff --git a/src/views/chat/index.vue b/src/views/chat/index.vue index 9807a16..de9e1b5 100644 --- a/src/views/chat/index.vue +++ b/src/views/chat/index.vue @@ -29,6 +29,7 @@ import lodingCir from "@/components/animation/lodingCir.vue" import lodingSpin from "@/components/animation/lodingSpin.vue" import IatRecorder from '@/utils/test.js' +import { start } from 'repl' // import IatRecorder from '@/utils/larRcorder.js' // import socket from "@/websocket/socket"; @@ -110,7 +111,8 @@ const conversationList = computed(() => const prompt = ref('') const loading = ref(false) const inputRef = ref(null) -const nowStatus = ref('input') // 当前系统状态, input等待, loding加载, record录音 +const nowStatus = ref('input') // 当前系统状态, input等待, loding加载, record录音, start开始 +const nowStart = ref(true) // 当前是否有消息, 有才显示聊天记录 // 添加PromptStore const promptStore = usePromptStore() @@ -220,6 +222,7 @@ async function onConversation() { // console.log(`当前消息: `, dataSources.value[dataSources.value.length - 1].text); lastText += msg.payload.choices.text[0].content const loading = true + nowStart.value = false updateChat( +uuid, dataSources.value.length - 1, @@ -619,7 +622,7 @@ window.addEventListener('test', (e) => { -
+