diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 20ade220..c560aebf 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -1,4 +1,4 @@ - + @@ -10,11 +10,10 @@ AI工作台 - - + +
- diff --git a/frontend/src/composables/useChat.ts b/frontend/src/composables/useChat.ts index fbee2eb0..7e72d3e9 100644 --- a/frontend/src/composables/useChat.ts +++ b/frontend/src/composables/useChat.ts @@ -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();