fix: avatar mode default on, show AI text in chat
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "宇之然AI磁场",
|
"name": "宇之然AI磁场",
|
||||||
"appid": "__UNI__DEV__",
|
"appid": "__UNI__DEV__",
|
||||||
"versionName": "1.0.5",
|
"versionName": "1.0.6",
|
||||||
"versionCode": "105",
|
"versionCode": "106",
|
||||||
"description": "职引 - 宇之然AI磁场旗下AI模拟面试平台,提供AI面试官模拟练习、简历智能优化、大厂面经题库,助你轻松应对校招面试。",
|
"description": "职引 - 宇之然AI磁场旗下AI模拟面试平台,提供AI面试官模拟练习、简历智能优化、大厂面经题库,助你轻松应对校招面试。",
|
||||||
"h5": {
|
"h5": {
|
||||||
"title": "职引 - AI模拟面试 | 宇之然AI磁场",
|
"title": "职引 - AI模拟面试 | 宇之然AI磁场",
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ const answeredCount = ref(0)
|
|||||||
const isComplete = ref(false)
|
const isComplete = ref(false)
|
||||||
const scrollToId = ref('')
|
const scrollToId = ref('')
|
||||||
const position = ref('')
|
const position = ref('')
|
||||||
const avatarMode = ref(false)
|
const avatarMode = ref(true)
|
||||||
const aiSpeechText = ref('')
|
const aiSpeechText = ref('')
|
||||||
const aiAudioUrl = ref('')
|
const aiAudioUrl = ref('')
|
||||||
const isSpeaking = ref(false)
|
const isSpeaking = ref(false)
|
||||||
@@ -173,11 +173,9 @@ const sendAnswer = async () => {
|
|||||||
})
|
})
|
||||||
if (res.statusCode === 200 && res.data?.messages) {
|
if (res.statusCode === 200 && res.data?.messages) {
|
||||||
const aiMsg = res.data.messages.find(m => m.role === 'ai')
|
const aiMsg = res.data.messages.find(m => m.role === 'ai')
|
||||||
|
messages.value.push(...res.data.messages)
|
||||||
if (avatarMode.value && aiMsg) {
|
if (avatarMode.value && aiMsg) {
|
||||||
// In avatar mode, only show avatar speaking, don't add to chat
|
|
||||||
await speakAiText(aiMsg.content, res.data.ttsHash)
|
await speakAiText(aiMsg.content, res.data.ttsHash)
|
||||||
} else {
|
|
||||||
messages.value.push(...res.data.messages)
|
|
||||||
}
|
}
|
||||||
answeredCount.value = res.data.questionCount || answeredCount.value + 1
|
answeredCount.value = res.data.questionCount || answeredCount.value + 1
|
||||||
if (res.data.ttsHash && !avatarMode.value) {
|
if (res.data.ttsHash && !avatarMode.value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user