2026-03-17 23:41:49 +08:00
|
|
|
<script setup>
|
|
|
|
|
import { Icon } from '@iconify/vue'
|
2026-03-20 18:21:26 +08:00
|
|
|
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>
|
2026-03-20 18:21:26 +08:00
|
|
|
<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">
|
2026-03-20 18:21:26 +08:00
|
|
|
<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>
|
2026-03-20 18:21:26 +08:00
|
|
|
<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>
|
2026-03-20 18:21:26 +08:00
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="icon"
|
|
|
|
|
class="size-9"
|
2026-03-17 23:41:49 +08:00
|
|
|
@click="openHistory"
|
|
|
|
|
title="历史记录"
|
|
|
|
|
>
|
2026-03-20 18:21:26 +08:00
|
|
|
<Icon icon="lucide:history" class="size-4" />
|
|
|
|
|
</Button>
|
2026-03-17 23:41:49 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|