fix build error

This commit is contained in:
sophie committed 2026-04-17 18:55:58 +08:00
1 parent e56c7db4d7
commit 7b0ed4e88b
2 files changed
+13 -8

No files matched your search

+3 -4
View File
@@ -1,4 +1,4 @@
<!doctype html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
@@ -10,11 +10,10 @@
<meta name="apple-mobile-web-app-title" content="AI工作台" />
<link rel="manifest" href="/manifest.webmanifest" />
<title>AI工作台</title>
<script type="module" crossorigin src="/assets/index-CG0nSVgb.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-1T4nGTgS.css">
<script type="module" crossorigin src="/assets/index-DNiQ9nKy.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DDtKBb2t.css">
</head>
<body>
<div id="app"></div>␍
</body>
</html>
+10 -4
View File
@@ -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();