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

This commit is contained in:
2026-03-27 16:57:46 +08:00
49 changed files with 1583 additions and 389 deletions

View File

@@ -36,10 +36,13 @@
import { useProjectStore } from '@/stores'
import { getProjectInfo } from '@/api/agent'
import { clearNodeChat, getNodeAncestors } from '@/api/versitonTree'
import { useRoute } from 'vue-router'
import { useRoute, useRouter } from 'vue-router'
import MyEvent from '@/utils/myEvent'
import { useI18n } from 'vue-i18n'
const route = useRoute()
const router = useRouter()
const { t } = useI18n()
const projectStore = useProjectStore()
const previewRef = ref(null)
@@ -90,6 +93,11 @@
const handleGetProjectInfoAndHistory = () => {
handleOpenSketch()
getProjectInfo({ id: route.params.id }).then((res) => {
if(!res) {
router.push({ name: 'mainInput' })
ElMessage.warning(t('Home.notFound'))
return
}
if (res) agentRef.value.setChatInfo(res)
let data = res?.project || res
if (data?.latestNodeId) data.nodeId = data.latestNodeId
@@ -125,6 +133,7 @@
projectStore.clearProject()
if (newVal) {
handleGetProjectInfoAndHistory()
MyEvent.emit('projectChange')
}
}
)