feat: 报告标题

This commit is contained in:
2026-03-27 16:49:29 +08:00
parent f1585770db
commit 23a15d2a5f
4 changed files with 27 additions and 11 deletions

View File

@@ -320,10 +320,6 @@
params.versionID = versionID
projectStore.setProject({ nodeId: versionID })
}
// if (eventName === 'webAddress') {
// console.log('webAddress111111111111111', eventName, dataLines)
// debugger
// }
if (eventName === 'tool') {
MyEvent.emit('loading-sketch', sketchList.value.length)
@@ -354,6 +350,9 @@
MyEvent.emit('OpenSketch')
// contentBody += `<slot slot-name="sketch"></slot>`
}
if (eventName === 'reportName' || eventName === 'reportTitle') {
aiMessage.reportName = jsonData.reportName || jsonData.reportTitle
}
if (eventName === 'report') {
reportsContent.value += jsonData.report
} else {
@@ -492,9 +491,11 @@
i++
} else if (item.role === 'assistant') {
// assistant 角色,拼接直到下一个 user
let combinedContent = item.content || ''
let combinedThinkingText = item.reasoning || ''
let combinedImageUrl = item.image_url || null
let reportName = item.reportName || null
// 继续往后找连续的 assistant 消息
let j = i + 1
while (j < dialogue.length && dialogue[j].role === 'assistant') {
@@ -504,6 +505,9 @@
if (dialogue[j].image_url) {
combinedImageUrl = dialogue[j].image_url
}
if (dialogue[j].reportName) {
reportName = dialogue[j].reportName
}
j++
}
@@ -514,6 +518,7 @@
result.push({
...item,
reportName,
content: combinedContent,
thinkingText: combinedThinkingText,
text: combinedContent,
@@ -618,7 +623,6 @@
item.text += `<slot slot-name="sketch"></slot>`
}
})
messageList.value = [...ancestorsList]
params.versionID = current?.id
sketchList.value = imgList