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

View File

@@ -76,7 +76,7 @@
<span>{{ content.webAddress?.length }} web pages have been retrieved.</span>
</div>
</div>
<Pause v-show="showStop && isLast" />
<Pause v-show="showStop" :key="props.content.createTime" />
<div
v-show="!content.streaming"
class="operate flex"
@@ -136,6 +136,14 @@
isLast: Boolean
}>()
// watch(
// () => props.content,
// (newVal) => {
// console.log('props', newVal)
// },
// { deep: true,immediate: true }
// )
const emit = defineEmits(['regenerate'])
const userAvatar = computed(() => {
@@ -321,12 +329,14 @@
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
}
}
.message-context {
line-height: 2rem;
font-size: 1.4rem;
width: 82%;
word-break: break-word;
}
&.is-user .message-context {
width: fit-content;

View File

@@ -13,11 +13,12 @@
width: 100%;
height: 3.6rem;
line-height: 3.6rem;
column-gap: 0.6rem;
padding: 0 1.2rem;
column-gap: 0.6rem;
padding: 0 1.2rem;
background-color: #fffcf4;
border-radius: 0.4rem;
margin-top: 1rem;
border-radius: 0.4rem;
margin-top: 1rem;
color: #ff7a51;
&::before {
content: '';
@@ -30,22 +31,18 @@
rgba(233, 121, 60, 0.3) 1.61%,
rgba(255, 207, 144, 0.3) 101.01%
);
-webkit-mask:
linear-gradient(#fff 0 0) content-box,
linear-gradient(#fff 0 0);
mask:
linear-gradient(#fff 0 0) content-box,
linear-gradient(#fff 0 0);
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
}
.c-svg{
width: initial;
.svg-icon{
width: 1.2rem;
height: 1.2rem;
}
}
.c-svg {
width: initial;
.svg-icon {
width: 1.2rem;
height: 1.2rem;
}
}
}
</style>

View File

@@ -1,8 +1,8 @@
<template>
<div class="report-card" :class="{ 'is-url': isUrl, 'is-sketch': isSketch }">
<div class="report-card-header">
<span v-if="!isUrl && !isSketch">{{ title || '' }}</span>
<div v-else class="web-sources flex align-center">
<!-- <span v-if="!isUrl && !isSketch">{{ title || '' }}</span> -->
<div class="web-sources flex align-center">
<span>{{ title || '' }}</span>
<img src="@/assets/images/link.png" class="link-icon" />
</div>
@@ -35,16 +35,19 @@
.report-card {
cursor: pointer;
width: 100%;
margin: 2.4rem 0;
height: 11.2rem;
margin: 1.2rem 0 0;
min-height: 11.2rem;
background: url('@/assets/images/report-card.png') no-repeat;
background-size: 100% 100%;
padding: 2.9rem;
overflow: hidden;
position: relative;
margin-bottom: 0;
&.is-url {
background: url('@/assets/images/link-card.png') no-repeat;
background-size: 100% 100%;
margin: 2.4rem 0;
}
&.is-sketch {
background: url('@/assets/images/sketch-card.png') no-repeat;
@@ -61,7 +64,7 @@
&-header {
font-family: 'Medium';
font-size: 1.6rem;
font-size: 1.2rem;
margin-bottom: 1.3rem;
overflow: hidden;
text-overflow: ellipsis;
@@ -80,7 +83,7 @@
&-content {
font-family: 'Regular';
font-weight: 300;
font-size: 1.6rem;
font-size: 1.2rem;
color: #7c7c7c;
}
}