feat: url link
This commit is contained in:
@@ -210,7 +210,6 @@
|
||||
// 流式响应处理
|
||||
let contentBody = ''
|
||||
let buffer = ''
|
||||
const webAddressList = []
|
||||
const reader = response.body?.getReader()
|
||||
if (!reader) throw new Error('无法获取流读取器')
|
||||
|
||||
@@ -248,10 +247,8 @@
|
||||
?.trim() || ''
|
||||
|
||||
if (!hasReportStarted && eventName === 'report') {
|
||||
console.log('开始生成报告--------')
|
||||
|
||||
isGeneratingReport.value = true
|
||||
contentBody += `<slot slot-name="card" title="123">123</slot>`
|
||||
contentBody += `<slot slot-name="card" title="123" content="123">123</slot>`
|
||||
hasReportStarted = true
|
||||
}
|
||||
|
||||
@@ -298,9 +295,9 @@
|
||||
params.versionID = dataLines[0]
|
||||
projectStore.setProject({ nodeId: dataLines[0] })
|
||||
}
|
||||
if (eventName === 'webAddress') {
|
||||
console.log('webAddress-----', eventName, dataLines)
|
||||
}
|
||||
// if (eventName === 'webAddress') {
|
||||
// console.log('webAddress111111111111111', eventName, dataLines)
|
||||
// }
|
||||
|
||||
if (eventName === 'tool') {
|
||||
MyEvent.emit('loading-sketch')
|
||||
@@ -313,7 +310,7 @@
|
||||
const jsonData = JSON.parse(jsonText)
|
||||
// console.log('jsonData', jsonData)
|
||||
if (jsonData.webAddress) {
|
||||
console.log('webAddress-----', jsonData)
|
||||
aiMessage.webAddress = JSON.parse(jsonData.webAddress)
|
||||
}
|
||||
if (jsonData.title) {
|
||||
emits('setTitle', jsonData.title)
|
||||
@@ -439,7 +436,10 @@
|
||||
|
||||
while (i < dialogue.length) {
|
||||
const item = dialogue[i]
|
||||
|
||||
if (item.webAddress?.length > 0) {
|
||||
console.log('item.webAddress-----', item.webAddress)
|
||||
debugger
|
||||
}
|
||||
if (item.role === 'user') {
|
||||
// user 角色直接添加
|
||||
result.push({
|
||||
@@ -496,7 +496,7 @@
|
||||
for (let i = 0; i < session.dialogue.length; i++) {
|
||||
if (session.dialogue[i].report) {
|
||||
session.dialogue[i].content =
|
||||
`<slot slot-name="card" title="123">123</slot>` +
|
||||
`<slot slot-name="card" title="123" content="123">123</slot>` +
|
||||
(session.dialogue[i].content || '')
|
||||
break
|
||||
}
|
||||
@@ -516,7 +516,7 @@
|
||||
|
||||
// 3. 收集 sketchIDAndUrl 到 imgList
|
||||
if (session.sketchIDAndUrl) {
|
||||
imgList.push(...session.sketchIDAndUrl)
|
||||
imgList.push(session.sketchIDAndUrl)
|
||||
}
|
||||
|
||||
// 4. 处理 dialogue
|
||||
|
||||
Reference in New Issue
Block a user