// The page's labeled message context (such as the selection in an open // workbook) as pills above the composer. The person can leave one out of their // messages and bring it back; a new label brings it back by itself. import { PlusIcon, TextSelectIcon, XIcon } from "lucide-react"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../ui/tooltip"; import { useMessageContextPills } from "../lib/app-host"; import { cn } from "../../lib/cn"; export function MessageContextPills() { const { pills, exclude, include } = useMessageContextPills(); if (pills.length === 0) return null; return (
{pills.map((pill) => { const description = pill.excluded ? `Not sent with your messages: ${pill.label}` : `Sent with your messages${pill.detail ? `: ${pill.detail}` : ""}`; return ( {pill.label} {description} ); })}
); }