{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"agent-chat-indicator","title":"Agent Chat Indicator","description":"A component for indicating the agent's chat status with a blinking dot. Useful for indicating the agent is thinking before generating a response.","dependencies":["motion","class-variance-authority"],"registryDependencies":["utils"],"files":[{"path":"components/agents-ui/agent-chat-indicator.tsx","content":"import { type Ref, type ComponentProps } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { motion, type MotionProps } from 'motion/react';\n\nimport { cn } from '@/lib/utils';\n\nconst motionAnimationProps = {\n  variants: {\n    hidden: {\n      opacity: 0,\n      scale: 0.1,\n      transition: {\n        duration: 0.1,\n        ease: 'linear' as const,\n      },\n    },\n    visible: {\n      opacity: [0.5, 1],\n      scale: [0.9, 1],\n      transition: {\n        type: 'spring' as const,\n        bounce: 0,\n        duration: 0.5,\n        repeat: Infinity,\n        repeatType: 'mirror' as const,\n      },\n    },\n  },\n  initial: 'hidden',\n  animate: 'visible',\n  exit: 'hidden',\n};\n\nconst agentChatIndicatorVariants = cva('bg-muted-foreground inline-block size-2.5 rounded-full', {\n  variants: {\n    size: {\n      sm: 'size-3',\n      md: 'size-4',\n      lg: 'size-6',\n    },\n  },\n  defaultVariants: {\n    size: 'md',\n  },\n});\n\n/**\n * Props for the AgentChatIndicator component.\n */\nexport interface AgentChatIndicatorProps extends MotionProps {\n  /**\n   * The size of the indicator dot.\n   * @defaultValue 'md'\n   */\n  size?: 'sm' | 'md' | 'lg';\n  /**\n   * Additional CSS class names to apply to the indicator.\n   */\n  className?: string;\n  /**\n   * Allows getting a ref to the component instance.\\nOnce the component unmounts, React will set `ref.current` to `null`\\n(or call the ref with `null` if you passed a callback ref).\\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}\n   */\n  ref?: Ref<HTMLSpanElement>;\n}\n\n/**\n * An animated indicator that shows the agent is processing or thinking.\n * Displays as a pulsing dot, typically used in chat interfaces.\n *\n * @extends ComponentProps<'span'>\n *\n * @example\n * ```tsx\n * {agentState === 'thinking' && <AgentChatIndicator size=\"md\" />}\n * ```\n */\nexport function AgentChatIndicator({\n  size = 'md',\n  className,\n  ...props\n}: AgentChatIndicatorProps &\n  ComponentProps<'span'> &\n  VariantProps<typeof agentChatIndicatorVariants>) {\n  return (\n    <motion.span\n      {...motionAnimationProps}\n      transition={{ duration: 0.1, ease: 'linear' as const }}\n      className={cn(agentChatIndicatorVariants({ size }), className)}\n      {...props}\n    />\n  );\n}\n","type":"registry:component"}],"type":"registry:component"}