Files
sionrui/frontend/app/web-gold/src/components/agents/ChatDrawerHeader.vue

42 lines
1.3 KiB
Vue
Raw Normal View History

2026-03-17 23:41:49 +08:00
<script setup>
import { Icon } from '@iconify/vue'
import { Button } from '@/components/ui/button'
2026-03-17 23:41:49 +08:00
defineProps({
agent: { type: Object, default: null }
})
const emit = defineEmits(['history'])
const openHistory = () => emit('history')
</script>
<template>
<div class="flex items-center justify-between px-4 py-3 border-b border-border/50 shrink-0 bg-gradient-to-r from-background to-muted/30">
2026-03-17 23:41:49 +08:00
<div class="flex items-center gap-3">
<div class="size-10 rounded-xl bg-gradient-to-br from-primary to-violet-500 flex items-center justify-center overflow-hidden shadow-sm shadow-primary/20">
<img
v-if="agent?.avatar"
:src="agent.avatar"
2026-03-17 23:41:49 +08:00
:alt="agent.name"
class="w-full h-full object-cover"
/>
<Icon v-else icon="lucide:bot" class="text-white text-xl" />
</div>
<div>
<div class="font-semibold text-foreground text-sm">{{ agent?.name || 'AI 助手' }}</div>
<div class="text-xs text-muted-foreground">{{ agent?.categoryName || '通用' }}</div>
2026-03-17 23:41:49 +08:00
</div>
</div>
<Button
variant="ghost"
size="icon"
class="size-9"
2026-03-17 23:41:49 +08:00
@click="openHistory"
title="历史记录"
>
<Icon icon="lucide:history" class="size-4" />
</Button>
2026-03-17 23:41:49 +08:00
</div>
</template>