fix: avatar mode default on, show AI text in chat

This commit is contained in:
yuzhiran
2026-06-12 14:45:36 +08:00
parent a622afd118
commit 087fb1d400
2 changed files with 4 additions and 6 deletions
+2 -4
View File
@@ -83,7 +83,7 @@ const answeredCount = ref(0)
const isComplete = ref(false)
const scrollToId = ref('')
const position = ref('')
const avatarMode = ref(false)
const avatarMode = ref(true)
const aiSpeechText = ref('')
const aiAudioUrl = ref('')
const isSpeaking = ref(false)
@@ -173,11 +173,9 @@ const sendAnswer = async () => {
})
if (res.statusCode === 200 && res.data?.messages) {
const aiMsg = res.data.messages.find(m => m.role === 'ai')
messages.value.push(...res.data.messages)
if (avatarMode.value && aiMsg) {
// In avatar mode, only show avatar speaking, don't add to chat
await speakAiText(aiMsg.content, res.data.ttsHash)
} else {
messages.value.push(...res.data.messages)
}
answeredCount.value = res.data.questionCount || answeredCount.value + 1
if (res.data.ttsHash && !avatarMode.value) {