wujingjing
2024-12-20 097c544bebb124efc0bdf421046af8908dbcafac
src/components/chat/Chat.vue
@@ -596,9 +596,8 @@
            if (chunkRes.mode === 'summary') {
               const lastMsg = computedMessageList.value.at(-1);
               const extraContent = parseExtraContent(chunkRes.value);
               // 此对话已经加入到对话列表
               if (lastMsg.content && extraContent) {
               if (lastMsg.content?.values && extraContent) {
                  for (const key in extraContent) {
                     if (Object.prototype.hasOwnProperty.call(extraContent, key)) {
                        const value = extraContent[key];
@@ -607,6 +606,11 @@
                        }
                     }
                  }
                  lastMsg.historyId = chunkRes.value.history_id;
                  const userMsg = computedMessageList.value.at(-2);
                  userMsg.historyId = chunkRes.value.history_id;
                  userMsg.content.values = chunkRes.value.question;
               }
               if (Object.keys(questionRes).length === 0) {
@@ -614,7 +618,7 @@
               }
               // 此对话还未加入到对话列表
               if (!lastMsg.content && questionRes) {
               if (!lastMsg.content?.values && questionRes) {
                  questionRes = {
                     ...questionRes,
                     ...chunkRes.value,