feat: 对话标题

This commit is contained in:
2026-03-25 16:58:06 +08:00
parent 7d8b626b07
commit c6a2bf09f1
5 changed files with 75 additions and 39 deletions

View File

@@ -5,7 +5,7 @@
:class="{ 'is-user': content.isUser, 'is-loading': content.loading }"
>
<div class="thumb">
<img :src="content.isUser ? userThumb : agentThumb" class="thumb-icon" />
<img :src="content.isUser ? userAvatar : agentThumb" class="thumb-icon" />
</div>
<div class="message-context" v-show="!content.loading">
<div class="img-list flex" v-if="imageList.length > 0">
@@ -120,6 +120,9 @@
import type { CustomAttrs } from '@crazydos/vue-markdown'
import rehypeRaw from 'rehype-raw'
import MyEvent from '@/utils/myEvent'
import { useUserInfoStore } from '@/stores'
const userStore = useUserInfoStore()
const { t } = useI18n()
@@ -128,16 +131,12 @@
isLast: Boolean
}>()
// watch(
// () => props,
// (newVal) => {
// console.log('newVal-----', newVal)
// },
// { immediate: true }
// )
const emit = defineEmits(['regenerate'])
const userAvatar = computed(() => {
return userStore.state.userInfo?.avatar || userThumb
})
const imageList = computed(() => {
const { imageUrls, role } = props.content
const list = []
@@ -340,6 +339,7 @@
.img-list {
column-gap: 1rem;
margin-bottom: 1.4rem;
justify-content: flex-end;
.img-item {
width: 6.8rem;
height: 6.8rem;