This commit is contained in:
lzp
2026-03-27 09:30:06 +08:00
9 changed files with 67 additions and 32 deletions

View File

@@ -1,3 +1,3 @@
<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>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -135,7 +135,9 @@ export default {
confirm: 'Confirm',
styleTitle: 'Settings',
createProject: 'Create Project',
trendingReport: 'Trending report'
trendingReport: 'Trending report',
reportPlaceholder:
'Generate a furniture trending report for 2026, including popular styles and design directions.'
},
area: {
unitedStates: 'United States',

View File

@@ -128,7 +128,8 @@ export default {
confirm: '确认',
styleTitle: '设置',
createProject: '创建项目',
trendingReport: '趋势报告'
trendingReport: '趋势报告',
reportPlaceholder: '生成一份2026年家具流行趋势报告内容包括流行风格和设计方向。'
},
area: {
unitedStates: '美国',

View File

@@ -495,6 +495,7 @@
let combinedContent = item.content || ''
let combinedThinkingText = item.reasoning || ''
let combinedImageUrl = item.image_url || null
let webAddress = item.webAddress || null
// 继续往后找连续的 assistant 消息
let j = i + 1
while (j < dialogue.length && dialogue[j].role === 'assistant') {
@@ -504,6 +505,12 @@
if (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++
}
@@ -518,6 +525,7 @@
thinkingText: combinedThinkingText,
text: combinedContent,
image_url: combinedImageUrl,
webAddress: !!webAddress ? JSON.parse(webAddress) : null,
isUser: false,
id: result.length + 1,
sessionId: sessionId
@@ -601,6 +609,11 @@
return
}
const { ancestors, current } = data
current.dialogue.forEach((item) => {
if (item.webAddress) {
console.log(item)
}
})
const imgList = []
const ancestorsList = []

View File

@@ -73,7 +73,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"
@@ -133,6 +133,14 @@
isLast: Boolean
}>()
// watch(
// () => props.content,
// (newVal) => {
// console.log('props', newVal)
// },
// { deep: true,immediate: true }
// )
const emit = defineEmits(['regenerate'])
const userAvatar = computed(() => {
@@ -318,12 +326,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;
}
}

View File

@@ -16,7 +16,7 @@
class="preview-image"
@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" />
</div>
</div>
@@ -305,8 +305,16 @@
}
// 移除图片
const removeImage = (index: number) => {
uploadedImages.value.splice(index, 1)
const removeImage = (index: number, item: any) => {
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[] = [
@@ -472,8 +480,7 @@
customPlaceholder.value = placeholderSpan
// 打字机效果显示placeholder文本
const placeholderText =
'Generate a furniture trending report for 2026, including popular styles and design directions.'
const placeholderText = t('Input.reportPlaceholder')
typeWriterEffect(placeholderSpan, placeholderText)
const removePlaceholderOnInput = () => {
@@ -815,6 +822,8 @@
}
const handleQuote = (url: string) => {
const hasQuoted = quoteList.value.includes(url)
if (hasQuoted) return
quoteList.value.push(url)
}
onUnmounted(() => {

View File

@@ -16,7 +16,7 @@
<span class="title" v-show="!isCollapse">{{ $t('Home.home') }}</span>
</div> -->
<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="icon jiantou" v-show="!isCollapse"
><svg-icon name="arrow-right" size="14" />