| | |
| | | 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]; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | 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) { |
| | |
| | | } |
| | | |
| | | // 此对话还未加入到对话列表 |
| | | if (!lastMsg.content && questionRes) { |
| | | if (!lastMsg.content?.values && questionRes) { |
| | | questionRes = { |
| | | ...questionRes, |
| | | ...chunkRes.value, |