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"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
@@ -10,11 +10,10 @@
<meta name="apple-mobile-web-app-title" content="AI工作台" /> <meta name="apple-mobile-web-app-title" content="AI工作台" />
<link rel="manifest" href="/manifest.webmanifest" /> <link rel="manifest" href="/manifest.webmanifest" />
<title>AI工作台</title> <title>AI工作台</title>
<script type="module" crossorigin src="/assets/index-CG0nSVgb.js"></script> <script type="module" crossorigin src="/assets/index-DNiQ9nKy.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-1T4nGTgS.css"> <link rel="stylesheet" crossorigin href="/assets/index-DDtKBb2t.css">
</head> </head>
<body> <body>
<div id="app"></div>␍ <div id="app"></div>␍
</body> </body>
</html> </html>
+10 -4
View File
@@ -256,8 +256,11 @@ export function useChat() {
total: botMsg.content.length, total: botMsg.content.length,
}); });
} }
if (botMsgIndex !== null && messages.value[botMsgIndex]) { if (botMsgIndex !== null) {
applyEventMetadata(messages.value[botMsgIndex], data); const currentBotMsg = messages.value[botMsgIndex];
if (currentBotMsg) {
applyEventMetadata(currentBotMsg, data);
}
} }
} else if (data.event === 'message_end') { } else if (data.event === 'message_end') {
if (data.conversation_id) { if (data.conversation_id) {
@@ -273,8 +276,11 @@ export function useChat() {
total: botMsg.content.length, total: botMsg.content.length,
}); });
} }
if (botMsgIndex !== null && messages.value[botMsgIndex]) { if (botMsgIndex !== null) {
applyEventMetadata(messages.value[botMsgIndex], data); const currentBotMsg = messages.value[botMsgIndex];
if (currentBotMsg) {
applyEventMetadata(currentBotMsg, data);
}
} }
} else if (data.event === 'error') { } else if (data.event === 'error') {
const botMsg = ensureBotMessage(); const botMsg = ensureBotMessage();