调整创建项目
This commit is contained in:
@@ -57,8 +57,8 @@
|
||||
</div>
|
||||
<div class="sendBox">
|
||||
<div class="enableThinking" :class="{active:enableThinking}" @click="()=>enableThinking = !enableThinking">Deep Thinking</div>
|
||||
<div class="maxNum">{{ chatContent.length }}/10000</div>
|
||||
<div class="send" :class="{active:chatContent.length>0}" @click="sendChat">
|
||||
<div class="maxNum">{{ chatContent?.length }}/10000</div>
|
||||
<div class="send" :class="{active:chatContent?.length>0}" @click="sendChat">
|
||||
<i class="fi fi-ss-paper-plane-top"></i>
|
||||
</div>
|
||||
</div>
|
||||
@@ -118,7 +118,12 @@ export default defineComponent({
|
||||
const sendChat = ()=>{
|
||||
if(!data.isFinish)return
|
||||
if(!data.chatContent)return
|
||||
let fileList = JSON.parse(JSON.stringify(data.filList))
|
||||
let fileList
|
||||
if(data.filList){
|
||||
fileList = JSON.parse(JSON.stringify(data.filList))
|
||||
}else{
|
||||
fileList = []
|
||||
}
|
||||
let fileUrl = (fileList.filter((item:any)=>item.type == 'file').length > 0) ? fileList.filter((item:any)=>item.type == 'file')[0].minioPath : ''
|
||||
let imageUrlList = (fileList.filter((item:any)=>item.type == 'image').length > 0)? fileList.filter((item:any)=>item.type == 'image').map((item:any)=>item.minioPath).join(',') : ''
|
||||
data.chatList.push({content:{message:data.chatContent,think:''},role:'user',fileList:fileList})
|
||||
@@ -148,13 +153,14 @@ export default defineComponent({
|
||||
data.chatList[data.chatList.length-1].content.think+=JSON.parse(event.data).content
|
||||
}
|
||||
}else{
|
||||
let list = ['[MOOD_SIGNAL]','[PRINT_SIGNAL]','[SKETCH_SIGNAL]']
|
||||
if(JSON.parse(event.data).status == "[DESIGN_SIGNAL]"){
|
||||
|
||||
}else if(JSON.parse(event.data).status == "[COLOR_SIGNAL]"){
|
||||
data.chatList.push({content:{message:''},role:'system'})
|
||||
data.chatList[data.chatList.length-1].content.color = JSON.parse(JSON.parse(event.data).tools_data).receiveCollectionElementList
|
||||
data.chatList.push({content:{message:''},role:'system'})
|
||||
}else{
|
||||
}else if(list.indexOf(JSON.parse(event.data).status)>-1){
|
||||
data.chatList.push({content:{message:''},role:'system'})
|
||||
data.chatList[data.chatList.length-1].content.img = JSON.parse(JSON.parse(event.data).tools_data).receiveCollectionElementList
|
||||
data.chatList.push({content:{message:''},role:'system'})
|
||||
|
||||
Reference in New Issue
Block a user