|
|
@ -1115,7 +1115,6 @@ watch( |
|
|
|
chatStore.messages.push(newVal[newVal.length - 1]); |
|
|
|
chatStore.currentUserIndex = chatStore.messages.length - 1; |
|
|
|
chatStore.inputUserIndex = chatStore.messages.length - 1; |
|
|
|
|
|
|
|
console.log( |
|
|
|
"消息列表已更新,最新消息:", |
|
|
|
chatStore.messages[chatStore.messages.length - 1], |
|
|
@ -1160,12 +1159,12 @@ watch( |
|
|
|
codeData.value.name |
|
|
|
); |
|
|
|
} |
|
|
|
for (let i = chatStore.messages.length - 1; i >= 0; --i) { |
|
|
|
if (chatStore.messages[i].sender == "user") { |
|
|
|
chatStore.messages[i].audioStatus = true; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
// for (let i = chatStore.messages.length - 1; i >= 0; --i) { |
|
|
|
// if (chatStore.messages[i].sender == "user") { |
|
|
|
// chatStore.messages[i].audioStatus = true; |
|
|
|
// break; |
|
|
|
// } |
|
|
|
// } |
|
|
|
chatStore.messages.push({ |
|
|
|
// class: "ing", |
|
|
|
// type: "ing", |
|
|
@ -1261,8 +1260,9 @@ watch( |
|
|
|
const env = import.meta.env.VITE_ENV; |
|
|
|
const result20 = await dataListAPI({ |
|
|
|
token: |
|
|
|
// "8Csj5VVX1UbIb4C3oxrnbZi0+fEeMx8pywnIlrmTm45Cb/EllzWACLto9J9+fCFsfdgBOvKvyY94FvqlvM0", |
|
|
|
"8nkj4QBV1RPIb4CzoRTnbZi0+fEeMx8pywnIlrmTxdwROKkuwWqAWu9orpkpeXVqL98DPfeonNYpHv+mucA", |
|
|
|
env == "development" || env == "test" |
|
|
|
? "8Csj5VVX1UbIb4C3oxrnbZi0+fEeMx8pywnIlrmTm45Cb/EllzWACLto9J9+fCFsfdgBOvKvyY94FvqlvM0" |
|
|
|
: "8nkj4QBV1RPIb4CzoRTnbZi0+fEeMx8pywnIlrmTxdwROKkuwWqAWu9orpkpeXVqL98DPfeonNYpHv+mucA", |
|
|
|
market: codeData.value.market, |
|
|
|
code: codeData.value.code, |
|
|
|
language: "cn", //t.value.suoxie, |
|
|
@ -1562,6 +1562,9 @@ watch( |
|
|
|
audioPreloadStatus.one.url |
|
|
|
); |
|
|
|
if (chatStore.currentUserIndex == chatStore.inputUserIndex) { |
|
|
|
chatStore.messages[ |
|
|
|
chatStore.inputUserIndex |
|
|
|
].audioStatus = true; |
|
|
|
addToAudioQueue(audioPreloadStatus.one.url, "API1-第一个"); |
|
|
|
} else { |
|
|
|
chatStore.messages[ |
|
|
@ -2469,10 +2472,12 @@ watch( |
|
|
|
}); |
|
|
|
chatStore.isLoading = false; |
|
|
|
chatStore.chatInput = false; |
|
|
|
chatStore.firstAPICall = false; |
|
|
|
emit("enableInput"); |
|
|
|
} |
|
|
|
} catch (e) { |
|
|
|
console.error("请求失败:", e); |
|
|
|
chatStore.firstAPICall = false; |
|
|
|
hasValidData.value = false; // 请求失败时设置数据无效 |
|
|
|
// chatStore.messages.pop(); |
|
|
|
// chatStore.messages.push({ |
|
|
@ -4948,7 +4953,7 @@ p { |
|
|
|
/* 用户消息容器样式 */ |
|
|
|
.user-message-container { |
|
|
|
display: flex; |
|
|
|
/* align-items: flex-start; */ |
|
|
|
align-items: flex-end; |
|
|
|
margin: 10px 0px; |
|
|
|
justify-content: flex-end; |
|
|
|
gap: 10px; |
|
|
@ -4958,6 +4963,8 @@ p { |
|
|
|
|
|
|
|
.user-msg { |
|
|
|
margin-left: auto; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
} |
|
|
|
|
|
|
|
.user-content { |
|
|
@ -4965,6 +4972,7 @@ p { |
|
|
|
height: 100%; |
|
|
|
align-items: center; |
|
|
|
margin-right: 5px; |
|
|
|
justify-content: flex-end; |
|
|
|
} |
|
|
|
|
|
|
|
.user-sendTime { |
|
|
@ -5009,9 +5017,9 @@ p { |
|
|
|
font-weight: bold; |
|
|
|
border-radius: 10px; |
|
|
|
margin: 0; |
|
|
|
width: fit-content; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
word-break: break-word; /* 启用强制换行 */ |
|
|
|
} |
|
|
|
|
|
|
|
.message-bubble.ai { |
|
|
|