diff --git a/easyflow-ui-admin/app/src/views/ai/agent-chat/index.vue b/easyflow-ui-admin/app/src/views/ai/agent-chat/index.vue index 77c39649..ce395511 100644 --- a/easyflow-ui-admin/app/src/views/ai/agent-chat/index.vue +++ b/easyflow-ui-admin/app/src/views/ai/agent-chat/index.vue @@ -24,6 +24,7 @@ import { ChatImageAttachments, ChatTimeline, ChatTimelineBuilder, + defaultAssistantAvatar, } from '@easyflow/common-ui'; import { copyTextToClipboard } from '@easyflow/utils'; @@ -1240,6 +1241,7 @@ onBeforeUnmount(() => { /> -import { computed, ref, watch } from 'vue'; +import { ref } from 'vue'; + +import { ChatAssistantAvatar } from '@easyflow/common-ui'; import { ArrowRight } from '@element-plus/icons-vue'; import { useResizeObserver } from '@vueuse/core'; import { ElIcon } from 'element-plus'; -const props = defineProps<{ +defineProps<{ agentName: string; avatar?: string; disabled?: boolean; @@ -17,11 +19,9 @@ const emit = defineEmits<{ selectQuestion: [question: string]; }>(); -const avatarFailed = ref(false); const welcomeRef = ref(); const legacyCompact = ref(false); const headingId = `agent-welcome-${Math.random().toString(36).slice(2, 9)}`; -const initial = computed(() => [...props.agentName.trim()][0] || 'A'); const needsContainerQueryFallback = typeof CSS === 'undefined' || !CSS.supports('container-type', 'inline-size'); @@ -29,13 +29,6 @@ useResizeObserver(welcomeRef, ([entry]) => { if (!needsContainerQueryFallback || !entry) return; legacyCompact.value = entry.contentRect.width <= 560; }); - -watch( - () => props.avatar, - () => { - avatarFailed.value = false; - }, -);