Merge branch 'main' of http://18.167.251.121:10003/aidlab/FiDA_Front
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.66667 3.33275V2.08333C1.66667 1.6231 1.29357 1.25 0.833333 1.25C0.373096 1.25 0 1.6231 0 2.08333V5.83333C0 6.29357 0.373096 6.66667 0.833333 6.66667H4.16667C4.6269 6.66667 5 6.29357 5 5.83333C5 5.3731 4.6269 5 4.16667 5H2.55837C3.712 3.00589 5.86695 1.66667 8.33333 1.66667C12.0152 1.66667 15 4.65143 15 8.33333C15 12.0152 12.0152 15 8.33333 15C5.16166 15 2.5055 12.7843 1.83185 9.81559C1.73001 9.36677 1.2836 9.08548 0.834775 9.18733C0.385947 9.28917 0.104662 9.73558 0.206506 10.1844C1.04863 13.8956 4.36638 16.6667 8.33333 16.6667C12.9357 16.6667 16.6667 12.9357 16.6667 8.33333C16.6667 3.73096 12.9357 0 8.33333 0C5.60633 0 3.18634 1.30996 1.66667 3.33275ZM8.33333 3.33333C8.79357 3.33333 9.16667 3.70643 9.16667 4.16667V8.33333C9.16667 8.55435 9.07887 8.76631 8.92259 8.92259L6.83926 11.0059C6.51382 11.3314 5.98618 11.3314 5.66074 11.0059C5.33531 10.6805 5.33531 10.1528 5.66074 9.82741L7.5 7.98816V4.16667C7.5 3.70643 7.8731 3.33333 8.33333 3.33333Z" fill="black" fill-opacity="0.75"/>
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.66667 3.33275V2.08333C1.66667 1.6231 1.29357 1.25 0.833333 1.25C0.373096 1.25 0 1.6231 0 2.08333V5.83333C0 6.29357 0.373096 6.66667 0.833333 6.66667H4.16667C4.6269 6.66667 5 6.29357 5 5.83333C5 5.3731 4.6269 5 4.16667 5H2.55837C3.712 3.00589 5.86695 1.66667 8.33333 1.66667C12.0152 1.66667 15 4.65143 15 8.33333C15 12.0152 12.0152 15 8.33333 15C5.16166 15 2.5055 12.7843 1.83185 9.81559C1.73001 9.36677 1.2836 9.08548 0.834775 9.18733C0.385947 9.28917 0.104662 9.73558 0.206506 10.1844C1.04863 13.8956 4.36638 16.6667 8.33333 16.6667C12.9357 16.6667 16.6667 12.9357 16.6667 8.33333C16.6667 3.73096 12.9357 0 8.33333 0C5.60633 0 3.18634 1.30996 1.66667 3.33275ZM8.33333 3.33333C8.79357 3.33333 9.16667 3.70643 9.16667 4.16667V8.33333C9.16667 8.55435 9.07887 8.76631 8.92259 8.92259L6.83926 11.0059C6.51382 11.3314 5.98618 11.3314 5.66074 11.0059C5.33531 10.6805 5.33531 10.1528 5.66074 9.82741L7.5 7.98816V4.16667C7.5 3.70643 7.8731 3.33333 8.33333 3.33333Z" fill="#0D0D0D"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -135,7 +135,9 @@ export default {
|
|||||||
confirm: 'Confirm',
|
confirm: 'Confirm',
|
||||||
styleTitle: 'Settings',
|
styleTitle: 'Settings',
|
||||||
createProject: 'Create Project',
|
createProject: 'Create Project',
|
||||||
trendingReport: 'Trending report'
|
trendingReport: 'Trending report',
|
||||||
|
reportPlaceholder:
|
||||||
|
'Generate a furniture trending report for 2026, including popular styles and design directions.'
|
||||||
},
|
},
|
||||||
area: {
|
area: {
|
||||||
unitedStates: 'United States',
|
unitedStates: 'United States',
|
||||||
|
|||||||
@@ -128,7 +128,8 @@ export default {
|
|||||||
confirm: '确认',
|
confirm: '确认',
|
||||||
styleTitle: '设置',
|
styleTitle: '设置',
|
||||||
createProject: '创建项目',
|
createProject: '创建项目',
|
||||||
trendingReport: '趋势报告'
|
trendingReport: '趋势报告',
|
||||||
|
reportPlaceholder: '生成一份2026年家具流行趋势报告,内容包括流行风格和设计方向。'
|
||||||
},
|
},
|
||||||
area: {
|
area: {
|
||||||
unitedStates: '美国',
|
unitedStates: '美国',
|
||||||
|
|||||||
@@ -495,6 +495,7 @@
|
|||||||
let combinedContent = item.content || ''
|
let combinedContent = item.content || ''
|
||||||
let combinedThinkingText = item.reasoning || ''
|
let combinedThinkingText = item.reasoning || ''
|
||||||
let combinedImageUrl = item.image_url || null
|
let combinedImageUrl = item.image_url || null
|
||||||
|
let webAddress = item.webAddress || null
|
||||||
// 继续往后找连续的 assistant 消息
|
// 继续往后找连续的 assistant 消息
|
||||||
let j = i + 1
|
let j = i + 1
|
||||||
while (j < dialogue.length && dialogue[j].role === 'assistant') {
|
while (j < dialogue.length && dialogue[j].role === 'assistant') {
|
||||||
@@ -504,6 +505,12 @@
|
|||||||
if (dialogue[j].image_url) {
|
if (dialogue[j].image_url) {
|
||||||
combinedImageUrl = dialogue[j].image_url
|
combinedImageUrl = dialogue[j].image_url
|
||||||
}
|
}
|
||||||
|
if (dialogue[j].webAddress) {
|
||||||
|
combinedContent += `<slot slot-name="url"></slot>`
|
||||||
|
webAddress = dialogue[j].webAddress
|
||||||
|
// console.log('webAddress22222222222222', dialogue[j].webAddress)
|
||||||
|
// debugger
|
||||||
|
}
|
||||||
j++
|
j++
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -518,6 +525,7 @@
|
|||||||
thinkingText: combinedThinkingText,
|
thinkingText: combinedThinkingText,
|
||||||
text: combinedContent,
|
text: combinedContent,
|
||||||
image_url: combinedImageUrl,
|
image_url: combinedImageUrl,
|
||||||
|
webAddress: !!webAddress ? JSON.parse(webAddress) : null,
|
||||||
isUser: false,
|
isUser: false,
|
||||||
id: result.length + 1,
|
id: result.length + 1,
|
||||||
sessionId: sessionId
|
sessionId: sessionId
|
||||||
@@ -601,6 +609,11 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const { ancestors, current } = data
|
const { ancestors, current } = data
|
||||||
|
current.dialogue.forEach((item) => {
|
||||||
|
if (item.webAddress) {
|
||||||
|
console.log(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const imgList = []
|
const imgList = []
|
||||||
const ancestorsList = []
|
const ancestorsList = []
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
<span>{{ content.webAddress?.length }} web pages have been retrieved.</span>
|
<span>{{ content.webAddress?.length }} web pages have been retrieved.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Pause v-show="showStop && isLast" />
|
<Pause v-show="showStop" :key="props.content.createTime" />
|
||||||
<div
|
<div
|
||||||
v-show="!content.streaming"
|
v-show="!content.streaming"
|
||||||
class="operate flex"
|
class="operate flex"
|
||||||
@@ -133,6 +133,14 @@
|
|||||||
isLast: Boolean
|
isLast: Boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
// watch(
|
||||||
|
// () => props.content,
|
||||||
|
// (newVal) => {
|
||||||
|
// console.log('props', newVal)
|
||||||
|
// },
|
||||||
|
// { deep: true,immediate: true }
|
||||||
|
// )
|
||||||
|
|
||||||
const emit = defineEmits(['regenerate'])
|
const emit = defineEmits(['regenerate'])
|
||||||
|
|
||||||
const userAvatar = computed(() => {
|
const userAvatar = computed(() => {
|
||||||
@@ -318,12 +326,14 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.message-context {
|
.message-context {
|
||||||
line-height: 2rem;
|
line-height: 2rem;
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
width: 82%;
|
width: 82%;
|
||||||
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
&.is-user .message-context {
|
&.is-user .message-context {
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
|
|||||||
@@ -13,11 +13,12 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 3.6rem;
|
height: 3.6rem;
|
||||||
line-height: 3.6rem;
|
line-height: 3.6rem;
|
||||||
column-gap: 0.6rem;
|
column-gap: 0.6rem;
|
||||||
padding: 0 1.2rem;
|
padding: 0 1.2rem;
|
||||||
background-color: #fffcf4;
|
background-color: #fffcf4;
|
||||||
border-radius: 0.4rem;
|
border-radius: 0.4rem;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
|
color: #ff7a51;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: '';
|
content: '';
|
||||||
@@ -30,22 +31,18 @@
|
|||||||
rgba(233, 121, 60, 0.3) 1.61%,
|
rgba(233, 121, 60, 0.3) 1.61%,
|
||||||
rgba(255, 207, 144, 0.3) 101.01%
|
rgba(255, 207, 144, 0.3) 101.01%
|
||||||
);
|
);
|
||||||
-webkit-mask:
|
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
||||||
linear-gradient(#fff 0 0) content-box,
|
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
||||||
linear-gradient(#fff 0 0);
|
|
||||||
mask:
|
|
||||||
linear-gradient(#fff 0 0) content-box,
|
|
||||||
linear-gradient(#fff 0 0);
|
|
||||||
-webkit-mask-composite: xor;
|
-webkit-mask-composite: xor;
|
||||||
mask-composite: exclude;
|
mask-composite: exclude;
|
||||||
}
|
}
|
||||||
|
|
||||||
.c-svg{
|
.c-svg {
|
||||||
width: initial;
|
width: initial;
|
||||||
.svg-icon{
|
.svg-icon {
|
||||||
width: 1.2rem;
|
width: 1.2rem;
|
||||||
height: 1.2rem;
|
height: 1.2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="report-card" :class="{ 'is-url': isUrl, 'is-sketch': isSketch }">
|
<div class="report-card" :class="{ 'is-url': isUrl, 'is-sketch': isSketch }">
|
||||||
<div class="report-card-header">
|
<div class="report-card-header">
|
||||||
<span v-if="!isUrl && !isSketch">{{ title || '' }}</span>
|
<!-- <span v-if="!isUrl && !isSketch">{{ title || '' }}</span> -->
|
||||||
<div v-else class="web-sources flex align-center">
|
<div class="web-sources flex align-center">
|
||||||
<span>{{ title || '' }}</span>
|
<span>{{ title || '' }}</span>
|
||||||
<img src="@/assets/images/link.png" class="link-icon" />
|
<img src="@/assets/images/link.png" class="link-icon" />
|
||||||
</div>
|
</div>
|
||||||
@@ -35,16 +35,19 @@
|
|||||||
.report-card {
|
.report-card {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 2.4rem 0;
|
height: 11.2rem;
|
||||||
|
margin: 1.2rem 0 0;
|
||||||
min-height: 11.2rem;
|
min-height: 11.2rem;
|
||||||
background: url('@/assets/images/report-card.png') no-repeat;
|
background: url('@/assets/images/report-card.png') no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
padding: 2.9rem;
|
padding: 2.9rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
margin-bottom: 0;
|
||||||
&.is-url {
|
&.is-url {
|
||||||
background: url('@/assets/images/link-card.png') no-repeat;
|
background: url('@/assets/images/link-card.png') no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
margin: 2.4rem 0;
|
||||||
}
|
}
|
||||||
&.is-sketch {
|
&.is-sketch {
|
||||||
background: url('@/assets/images/sketch-card.png') no-repeat;
|
background: url('@/assets/images/sketch-card.png') no-repeat;
|
||||||
@@ -61,7 +64,7 @@
|
|||||||
|
|
||||||
&-header {
|
&-header {
|
||||||
font-family: 'Medium';
|
font-family: 'Medium';
|
||||||
font-size: 1.6rem;
|
font-size: 1.2rem;
|
||||||
margin-bottom: 1.3rem;
|
margin-bottom: 1.3rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
@@ -80,7 +83,7 @@
|
|||||||
&-content {
|
&-content {
|
||||||
font-family: 'Regular';
|
font-family: 'Regular';
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-size: 1.6rem;
|
font-size: 1.2rem;
|
||||||
color: #7c7c7c;
|
color: #7c7c7c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
class="preview-image"
|
class="preview-image"
|
||||||
@click="previewImage(image.url)"
|
@click="previewImage(image.url)"
|
||||||
/>
|
/>
|
||||||
<div class="image-remove-btn" @click="removeImage(index)">
|
<div class="image-remove-btn" @click="removeImage(index, image)">
|
||||||
<SvgIcon name="delete" size="16" />
|
<SvgIcon name="delete" size="16" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -305,8 +305,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 移除图片
|
// 移除图片
|
||||||
const removeImage = (index: number) => {
|
const removeImage = (index: number, item: any) => {
|
||||||
uploadedImages.value.splice(index, 1)
|
if (quoteList.value.includes(item)) {
|
||||||
|
const quoteIndex = quoteList.value.indexOf(item)
|
||||||
|
if (quoteIndex > -1) {
|
||||||
|
quoteList.value.splice(quoteIndex, 1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
uploadedImages.value.splice(index, 1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const styleKeys: string[] = [
|
const styleKeys: string[] = [
|
||||||
@@ -472,8 +480,7 @@
|
|||||||
customPlaceholder.value = placeholderSpan
|
customPlaceholder.value = placeholderSpan
|
||||||
|
|
||||||
// 打字机效果显示placeholder文本
|
// 打字机效果显示placeholder文本
|
||||||
const placeholderText =
|
const placeholderText = t('Input.reportPlaceholder')
|
||||||
'Generate a furniture trending report for 2026, including popular styles and design directions.'
|
|
||||||
typeWriterEffect(placeholderSpan, placeholderText)
|
typeWriterEffect(placeholderSpan, placeholderText)
|
||||||
|
|
||||||
const removePlaceholderOnInput = () => {
|
const removePlaceholderOnInput = () => {
|
||||||
@@ -815,6 +822,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleQuote = (url: string) => {
|
const handleQuote = (url: string) => {
|
||||||
|
const hasQuoted = quoteList.value.includes(url)
|
||||||
|
if (hasQuoted) return
|
||||||
quoteList.value.push(url)
|
quoteList.value.push(url)
|
||||||
}
|
}
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<span class="title" v-show="!isCollapse">{{ $t('Home.home') }}</span>
|
<span class="title" v-show="!isCollapse">{{ $t('Home.home') }}</span>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="menu-item" @click="onHistory" :class="{ active: showHistory }">
|
<div class="menu-item" @click="onHistory" :class="{ active: showHistory }">
|
||||||
<span class="icon"><svg-icon name="history" size="24" /></span>
|
<span class="icon"><svg-icon name="history" size="16" /></span>
|
||||||
<span class="title" v-show="!isCollapse">{{ $t('Home.history') }}</span>
|
<span class="title" v-show="!isCollapse">{{ $t('Home.history') }}</span>
|
||||||
<span class="icon jiantou" v-show="!isCollapse"
|
<span class="icon jiantou" v-show="!isCollapse"
|
||||||
><svg-icon name="arrow-right" size="14" />
|
><svg-icon name="arrow-right" size="14" />
|
||||||
|
|||||||
Reference in New Issue
Block a user