import type { FeedbackDataSharingPreference, FeedbackVoteValue, } from "@paperclipai/shared"; import { useCopyAction } from "@/lib/use-copy-action"; import { IssueChatFeedbackButtons } from "@/components/AgentBubbleActionRow"; import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; import { Check, Copy, X, Info } from "lucide-react"; /** Feedback-vote wiring for an agent bubble, resolved per comment by the host. */ export interface TaskChatBubbleFeedback { activeVote: FeedbackVoteValue | null; sharingPreference: FeedbackDataSharingPreference; termsUrl: string | null; onVote: ( vote: FeedbackVoteValue, options?: { allowSharing?: boolean; reason?: string }, ) => Promise; } /** * Compact copy · 👍 · 👎 cluster prepended to an agent bubble's footer line * (PAP-413), leading the "✓ Worked · …" turn summary (or the bare timestamp * when the reply had no run activity). It reuses the shared * {@link IssueChatFeedbackButtons} so the redesigned task thread speaks the * same feedback language as the conference room's {@link AgentBubbleActionRow}; * the timestamp stays owned by the summary/bubble, so it is not duplicated here. */ export function TaskChatBubbleActions({ copyText, feedback, fastResponse, }: { copyText: string; fastResponse?: boolean; feedback?: TaskChatBubbleFeedback | null; }) { const { copied, failed, copy } = useCopyAction(2000); const label = failed ? "Couldn’t copy message" : "Copy message"; return (
{fastResponse && Platform-generated acknowledgement. The agent’s substantive response follows separately.} {feedback ? ( ) : null}
); }