fix build error
This commit is contained in:
1 parent
e56c7db4d7
commit
7b0ed4e88b
2 files changed
+13
-8
No files matched your search
@@ -256,8 +256,11 @@ export function useChat() {
|
||||
total: botMsg.content.length,
|
||||
});
|
||||
}
|
||||
if (botMsgIndex !== null && messages.value[botMsgIndex]) {
|
||||
applyEventMetadata(messages.value[botMsgIndex], data);
|
||||
if (botMsgIndex !== null) {
|
||||
const currentBotMsg = messages.value[botMsgIndex];
|
||||
if (currentBotMsg) {
|
||||
applyEventMetadata(currentBotMsg, data);
|
||||
}
|
||||
}
|
||||
} else if (data.event === 'message_end') {
|
||||
if (data.conversation_id) {
|
||||
@@ -273,8 +276,11 @@ export function useChat() {
|
||||
total: botMsg.content.length,
|
||||
});
|
||||
}
|
||||
if (botMsgIndex !== null && messages.value[botMsgIndex]) {
|
||||
applyEventMetadata(messages.value[botMsgIndex], data);
|
||||
if (botMsgIndex !== null) {
|
||||
const currentBotMsg = messages.value[botMsgIndex];
|
||||
if (currentBotMsg) {
|
||||
applyEventMetadata(currentBotMsg, data);
|
||||
}
|
||||
}
|
||||
} else if (data.event === 'error') {
|
||||
const botMsg = ensureBotMessage();
|
||||
|
||||
Reference in new issue
Block a user