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

@@ -56,7 +56,7 @@
const isGenerating = ref(false)
const isPaused = ref(false) // 标记是否为主动暂停
const params = reactive<AgentParamsType>({
projectID: projectStore.state.id,
projectID: null,
message: '',
token: userStore.state.token,
versionID: '',
@@ -170,13 +170,16 @@
const abortController = createAbortController()
// console.log('token---', params.token, '参数---', params)
params.projectID = projectStore.state.id
try {
const urlParams = new URLSearchParams<AgentParamsType>({
...params,
configParams: JSON.stringify(params.configParams)
})
const BASEURL = import.meta.env.VITE_APP_URL
// console.log('params', params)
// debugger
const response = await fetch(`${BASEURL}${chatUrl}?${urlParams.toString()}`, {
method: 'GET',
signal: abortController.signal
@@ -496,6 +499,7 @@
let combinedThinkingText = item.reasoning || ''
let combinedImageUrl = item.image_url || null
let reportName = item.reportName || null
let webAddress = item.webAddress || null
// 继续往后找连续的 assistant 消息
let j = i + 1
while (j < dialogue.length && dialogue[j].role === 'assistant') {
@@ -508,6 +512,12 @@
if (dialogue[j].reportName) {
reportName = dialogue[j].reportName
}
if (dialogue[j].webAddress) {
combinedContent += `<slot slot-name="url"></slot>`
webAddress = dialogue[j].webAddress
// console.log('webAddress22222222222222', dialogue[j].webAddress)
// debugger
}
j++
}
@@ -523,6 +533,7 @@
thinkingText: combinedThinkingText,
text: combinedContent,
image_url: combinedImageUrl,
webAddress: !!webAddress ? JSON.parse(webAddress) : null,
isUser: false,
id: result.length + 1,
sessionId: sessionId