Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/FiDA_Front

This commit is contained in:
X1627315083@163.com
2026-03-31 15:58:42 +08:00
5 changed files with 20 additions and 18 deletions

View File

@@ -0,0 +1,3 @@
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0.263992 0.263993C0.615983 -0.0879974 1.18667 -0.0879971 1.53866 0.263993L6 4.72533L10.4613 0.263993C10.8133 -0.087998 11.384 -0.0879971 11.736 0.263993C12.088 0.615983 12.088 1.18667 11.736 1.53866L7.27467 6L11.736 10.4613C12.088 10.8133 12.088 11.384 11.736 11.736C11.384 12.088 10.8133 12.088 10.4613 11.736L6 7.27467L1.53866 11.736C1.18667 12.088 0.615983 12.088 0.263992 11.736C-0.0879975 11.384 -0.0879975 10.8133 0.263992 10.4613L4.72533 6L0.263992 1.53866C-0.0879975 1.18667 -0.0879975 0.615983 0.263992 0.263993Z" fill="#D58C4D"/>
</svg>

After

Width:  |  Height:  |  Size: 653 B

View File

@@ -23,7 +23,13 @@
@mousedown="handleContainerMouseDown"
>
<div class="assistant-header-title">AI Assistant</div>
<SvgIcon name="canvas-assistant-menu" class="menu-icon" color="#D58C4D" />
<SvgIcon
name="closeAssistant"
class="menu-icon"
size="12"
color="#D58C4D"
@click="showAssistant = false"
/>
</div>
<div class="assistant-body flex-1">
<List :messageList="messageList" />
@@ -81,7 +87,7 @@
)
const listenAssistantPushChat = (message: Message) => {
// console.log('有新消息--');
console.log('有新消息--');
const exist = messageList.value.find((item: Message) => item.nodeType === message.nodeType)
if (!exist) {
@@ -98,10 +104,10 @@
<style lang="less" scoped>
.trigger {
position: absolute;
right: 0;
right: 3rem;
top: 10.3rem;
width: 5rem;
height: 5rem;
bottom: 50%;
background-color: #fff;
border-radius: 50%;
cursor: grab;
@@ -134,8 +140,8 @@
.assistant-container {
position: absolute;
right: 6.2rem;
bottom: 13.2rem;
right: 3rem;
top: 16.6rem;
width: 46.69rem;
height: 56.6rem;
flex-shrink: 0;
@@ -169,7 +175,8 @@
}
.menu-icon {
width: 1.8rem;
cursor: pointer;
width: initial;
}
}

View File

@@ -62,7 +62,6 @@
<threeModel :currentData="currentData" />
</template>
</baseModal>
<Assistant />
</template>
<script setup lang="ts">
@@ -70,7 +69,6 @@
import { computed, ref, watch, onMounted, nextTick, provide, onBeforeUnmount } from 'vue'
import { useLayout } from '@/utils/treeDiagram'
import { NODE_TYPE, NODE_COMPONENT } from './tools/index.d'
import Assistant from '@/components/Assistant/assistant.vue'
// 组件
import headerTools from './components/header-tools.vue'
import zoom from '../components/zoom.vue'

View File

@@ -11,6 +11,7 @@
>
<slot></slot>
<my-info />
<Assistant />
<div class="close-btn" @click="close">
<svg-icon name="back-white" color="#fff" size="18" />
</div>
@@ -20,6 +21,7 @@
<script setup lang="ts">
import { ref, watch } from 'vue'
import MyInfo from '@/components/MyInfo.vue'
import Assistant from '@/components/Assistant/assistant.vue'
const props = defineProps({
modelValue: { default: false, type: Boolean },
transitionTime: { default: 300, type: Number },

View File

@@ -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