Merge branch 'main' of http://18.167.251.121:10003/aidlab/FiDA_Front
This commit is contained in:
@@ -18,16 +18,19 @@
|
|||||||
const {t:$t} = useI18n()
|
const {t:$t} = useI18n()
|
||||||
const open = async (options) => {
|
const open = async (options) => {
|
||||||
let json = []
|
let json = []
|
||||||
|
let isGetJson = false
|
||||||
await new Promise((resolve) => {
|
await new Promise((resolve) => {
|
||||||
getSketchFlowCanvas({ id: options.imgId },true).then((res:any) => {
|
getSketchFlowCanvas({ id: options.imgId },true).then((res:any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
json = JSON.parse(res)
|
json = JSON.parse(res)
|
||||||
}
|
}
|
||||||
|
isGetJson = true
|
||||||
resolve(true)
|
resolve(true)
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
resolve(true)
|
resolve(false)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
if(!isGetJson)return
|
||||||
config.value = options || {}
|
config.value = options || {}
|
||||||
config.value.json = json
|
config.value.json = json
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
|
|||||||
@@ -187,7 +187,7 @@
|
|||||||
isPaused.value = false
|
isPaused.value = false
|
||||||
isGenerating.value = true
|
isGenerating.value = true
|
||||||
params.message = message.text
|
params.message = message.text
|
||||||
if (message.hasOwnProperty('useReport')) {
|
if (Object.prototype.hasOwnProperty.call(message, 'useReport')) {
|
||||||
params.useReport = message.useReport
|
params.useReport = message.useReport
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -589,7 +589,7 @@
|
|||||||
thinkingText: combinedThinkingText,
|
thinkingText: combinedThinkingText,
|
||||||
text: combinedContent,
|
text: combinedContent,
|
||||||
image_url: combinedImageUrl,
|
image_url: combinedImageUrl,
|
||||||
webAddress: !!webAddress ? JSON.parse(webAddress) : null,
|
webAddress: webAddress ? JSON.parse(webAddress) : null,
|
||||||
isUser: false,
|
isUser: false,
|
||||||
id: result.length + 1,
|
id: result.length + 1,
|
||||||
sessionId: sessionId
|
sessionId: sessionId
|
||||||
@@ -688,7 +688,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
setChatInfo
|
setChatInfo,
|
||||||
|
isGenerating
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
>
|
>
|
||||||
<template v-if="type === 'sketch'">
|
<template v-if="type === 'sketch'">
|
||||||
<div
|
<div
|
||||||
class="sketch-item"
|
class="sketch-item flex flex-center"
|
||||||
v-for="(item, index) in combineSketchList"
|
v-for="(item, index) in combineSketchList"
|
||||||
:key="'sketch-item-' + index"
|
:key="'sketch-item-' + index"
|
||||||
>
|
>
|
||||||
@@ -334,7 +334,7 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
// height: 100%;
|
||||||
border-radius: 1.6rem;
|
border-radius: 1.6rem;
|
||||||
}
|
}
|
||||||
.loading-wrapper {
|
.loading-wrapper {
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="agent-wrapper flex space-between">
|
<div class="agent-wrapper flex space-between">
|
||||||
<div class="openVersionTree">
|
<div class="openVersionTree">
|
||||||
<div class="btn" @click="versionTreeData.drawer = true">Version Tree</div>
|
<div class="btn" :class="{ 'is-disabled': isAgentGenerating }" @click="handleOpenVersionTree">
|
||||||
|
Version Tree
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<KeepAlive :max="10">
|
<KeepAlive :max="10">
|
||||||
@@ -55,6 +57,7 @@
|
|||||||
const VersionTreeIndexRef = ref()
|
const VersionTreeIndexRef = ref()
|
||||||
const agentRef = ref()
|
const agentRef = ref()
|
||||||
const sketchList = ref([])
|
const sketchList = ref([])
|
||||||
|
const isAgentGenerating = computed(() => Boolean(agentRef.value?.isGenerating))
|
||||||
const updateSketchList = (newVal) => {
|
const updateSketchList = (newVal) => {
|
||||||
sketchList.value = newVal
|
sketchList.value = newVal
|
||||||
// VersionTreeIndexRef.value.getVersionTree()
|
// VersionTreeIndexRef.value.getVersionTree()
|
||||||
@@ -63,7 +66,7 @@
|
|||||||
const handleDeleteSketch = (id) => {
|
const handleDeleteSketch = (id) => {
|
||||||
sketchList.value = sketchList.value
|
sketchList.value = sketchList.value
|
||||||
.map((sketchItem) => {
|
.map((sketchItem) => {
|
||||||
if (sketchItem.hasOwnProperty(id)) {
|
if (Object.prototype.hasOwnProperty.call(sketchItem, id)) {
|
||||||
delete sketchItem[id]
|
delete sketchItem[id]
|
||||||
}
|
}
|
||||||
return sketchItem
|
return sketchItem
|
||||||
@@ -79,6 +82,11 @@
|
|||||||
drawer: false
|
drawer: false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const handleOpenVersionTree = () => {
|
||||||
|
if (isAgentGenerating.value) return
|
||||||
|
versionTreeData.value.drawer = true
|
||||||
|
}
|
||||||
|
|
||||||
const handleRestore = () => {
|
const handleRestore = () => {
|
||||||
// agentRef.value?.inputRef?.addReportTag('Restore')
|
// agentRef.value?.inputRef?.addReportTag('Restore')
|
||||||
clearNodeChat({ projectId: projectStore.state.id, id: projectStore.state.nodeId }).then(
|
clearNodeChat({ projectId: projectStore.state.id, id: projectStore.state.nodeId }).then(
|
||||||
@@ -203,6 +211,10 @@ const handleGetProjectInfoAndHistory = () => {
|
|||||||
border-radius: 2.5rem;
|
border-radius: 2.5rem;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
|
&.is-disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
host: '0.0.0.0', // 允许局域网内的IP访问
|
host: '0.0.0.0', // 允许局域网内的IP访问
|
||||||
port: 8060, // 根据环境设置端口
|
port: 8060, // 根据环境设置端口
|
||||||
open: false, // 自动打开浏览器
|
open: false, // 自动打开浏览器
|
||||||
strictPort: true, // 如果端口已被占用,则尝试下一个可用端口
|
strictPort: false, // 如果端口已被占用,则尝试下一个可用端口
|
||||||
hmr: {
|
hmr: {
|
||||||
overlay: true
|
overlay: true
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user