'use client' import type { AvatarSize } from '@langgenius/dify-ui/avatar' import { AvatarFallback, AvatarRoot } from '@langgenius/dify-ui/avatar' import { cn } from '@langgenius/dify-ui/cn' export type WorkspaceAvatarSize = Extract const workspaceAvatarClasses: Record = { xs: { root: 'rounded-md', text: 'text-[10px] leading-3' }, sm: { root: 'rounded-md', text: 'text-[13px] leading-4' }, lg: { root: 'rounded-lg', text: 'text-base leading-5' }, '2xl': { root: 'rounded-xl', text: 'text-xl leading-7' }, } export function WorkspaceAvatar({ name, size = 'sm', className, }: { name?: string size?: WorkspaceAvatarSize className?: string }) { return ( {name?.[0]?.toLocaleUpperCase() || '?'} ) }