"use client"; import type { ReactNode } from "react"; import { Users } from "lucide-react"; import { HoverCard, HoverCardTrigger, HoverCardContent } from "@/components/ui/hover-card"; import { ActorAvatar } from "@/components/common/actor-avatar"; import { useWorkspaceStore } from "@/features/workspace"; interface MentionHoverCardProps { type: string; id: string; children: ReactNode; } function MentionHoverCard({ type, id, children }: MentionHoverCardProps) { const members = useWorkspaceStore((s) => s.members); const agents = useWorkspaceStore((s) => s.agents); if (type === "all") { return ( } className="cursor-default"> {children}

All members

Notifies all workspace members

); } if (type === "member") { const member = members.find((m) => m.user_id === id); if (!member) return <>{children}; return ( } className="cursor-default"> {children}

{member.name}

{member.email}

); } if (type === "agent") { const agent = agents.find((a) => a.id === id); if (!agent) return <>{children}; return ( } className="cursor-default"> {children}

{agent.name}

{agent.description && (

{agent.description}

)}
); } return <>{children}; } export { MentionHoverCard };