feat: 小象助手
This commit is contained in:
@@ -345,11 +345,7 @@
|
||||
|
||||
if (hasSketch) {
|
||||
hasSketchEvent = true
|
||||
console.log('当前sketchList',sketchList.value);
|
||||
console.log('当前收到的sketch',jsonData,typeof jsonData);
|
||||
// Object.keys(jsonData).forEach((key) => {
|
||||
// sketchList.value.push(jsonData[key])
|
||||
// })
|
||||
|
||||
Object.keys(jsonData).forEach((key) => {
|
||||
if (!sketchList.value.some((item) => item[key])) {
|
||||
sketchList.value.push({
|
||||
@@ -357,9 +353,6 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
// sketchList.value.push({
|
||||
// [Object.keys(jsonData)[0]]: jsonData[Object.keys(jsonData)[0]]
|
||||
// })
|
||||
// 通知 Preview 有新 sketch 正在加载,传入 sketch 索引
|
||||
MyEvent.emit('loading-sketch', sketchList.value.length - 1)
|
||||
MyEvent.emit('OpenSketch')
|
||||
@@ -398,7 +391,6 @@
|
||||
} catch (e) {
|
||||
// 检查是否为纯文本 [DONE]
|
||||
if (jsonText.trim() === '[DONE]') {
|
||||
|
||||
console.log('结束-----------------------')
|
||||
aiMessage.text = contentBody
|
||||
aiMessage.streaming = false
|
||||
|
||||
Reference in New Issue
Block a user