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 -2
View File
@@ -1,8 +1,8 @@
{
"name": "宇之然AI磁场",
"appid": "__UNI__DEV__",
"versionName": "1.0.5",
"versionCode": "105",
"versionName": "1.0.6",
"versionCode": "106",
"description": "职引 - 宇之然AI磁场旗下AI模拟面试平台,提供AI面试官模拟练习、简历智能优化、大厂面经题库,助你轻松应对校招面试。",
"h5": {
"title": "职引 - AI模拟面试 | 宇之然AI磁场",
+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) {