feat: webAddress
This commit is contained in:
@@ -146,7 +146,7 @@
|
||||
id: messageList.value.length + 1,
|
||||
text: '',
|
||||
isUser: false,
|
||||
sessionId: 'projectStore.state.id',
|
||||
sessionId: projectStore.state.id,
|
||||
loading: true,
|
||||
thinking: false,
|
||||
thinkingText: '',
|
||||
@@ -258,7 +258,7 @@
|
||||
reportsContent.value
|
||||
) {
|
||||
isGeneratingReport.value = false
|
||||
localStorage.setItem(
|
||||
sessionStorage.setItem(
|
||||
'reportsContent_' + projectStore.state.id,
|
||||
reportsContent.value
|
||||
)
|
||||
@@ -297,6 +297,7 @@
|
||||
}
|
||||
// if (eventName === 'webAddress') {
|
||||
// console.log('webAddress111111111111111', eventName, dataLines)
|
||||
// debugger
|
||||
// }
|
||||
|
||||
if (eventName === 'tool') {
|
||||
@@ -311,17 +312,17 @@
|
||||
// console.log('jsonData', jsonData)
|
||||
if (jsonData.webAddress) {
|
||||
aiMessage.webAddress = JSON.parse(jsonData.webAddress)
|
||||
contentBody += `<slot slot-name="url">123</slot>`
|
||||
}
|
||||
if (jsonData.title) {
|
||||
emits('setTitle', jsonData.title)
|
||||
}
|
||||
|
||||
if (hasSketch) {
|
||||
console.log('sketch事件-----', jsonData);
|
||||
|
||||
sketchList.value.push({
|
||||
[Object.keys(jsonData)[0]]: jsonData[Object.keys(jsonData)[0]]
|
||||
})
|
||||
MyEvent.emit('OpenSketch')
|
||||
}
|
||||
if (eventName === 'report') {
|
||||
reportsContent.value += jsonData.report
|
||||
@@ -438,10 +439,6 @@
|
||||
|
||||
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({
|
||||
@@ -513,7 +510,7 @@
|
||||
}
|
||||
})
|
||||
if (reportStr && session.id) {
|
||||
localStorage.setItem(`reportsContent_${session.id}`, reportStr)
|
||||
sessionStorage.setItem(`reportsContent_${session.id}`, reportStr)
|
||||
}
|
||||
|
||||
// 3. 收集 sketchIDAndUrl 到 imgList
|
||||
|
||||
Reference in New Issue
Block a user