{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ai-home",
  "title": "AI home",
  "description": "An AI assistant's start page — a soft AI glow, a greeting, the large composer with Ask/Agent modes, and starter cards.",
  "registryDependencies": [
    "https://www.quilldesignsystem.com/r/prompt-composer.json",
    "https://www.quilldesignsystem.com/r/ai-mark.json",
    "https://www.quilldesignsystem.com/r/suggested-prompts.json"
  ],
  "files": [
    {
      "path": "registry/blocks/ai-home.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport { PromptComposer } from '@/components/ui/prompt-composer'\nimport { Button } from '@/components/ui/button'\nimport { Icon } from '@/components/ui/icon'\nimport { SuggestedPrompts } from '@/components/ui/suggested-prompts'\n\nconst STARTERS = [\n  { title: 'Brainstorm', detail: 'Ideas for a launch', prompt: 'Brainstorm ideas for our next launch' },\n  { title: 'Draft a brief', detail: 'From my notes', prompt: 'Draft a brief from my notes' },\n  { title: 'Plan my week', detail: 'Around my meetings', prompt: 'Plan my week around my meetings' },\n  { title: 'Find', detail: 'Tasks due soon', prompt: 'Find tasks due soon' },\n]\n\n/** An AI assistant's start page — a soft AI glow, a greeting, the large composer with Ask/Agent modes, and starter cards. */\nexport function AiHome({\n  greeting = 'What should we work on?',\n  starters = STARTERS,\n  onSubmit = () => {},\n  onAdd,\n  onMic,\n}: {\n  greeting?: string\n  starters?: { title: string; detail: string; prompt: string }[]\n  onSubmit?: (value: string) => void\n  onAdd?: () => void // shows the + button (files, apps or context)\n  onMic?: () => void // shows the mic while the box is empty\n}) {\n  const [value, setValue] = React.useState('')\n  const composerRef = React.useRef<HTMLTextAreaElement>(null)\n  return (\n    // Not place-content-center: that sizes the one column to its widest child (the\n    // starter row, 592px), so the composer's max-w-2xl never reached 672px.\n    <section className=\"ai-glow grid min-h-frame-sm content-center justify-items-center gap-5 px-4 py-16\">\n      {/* The approved sketch's heading: Fraunces' text cut at 24px, normal tracking — calmer than h1's display preset. */}\n      <h1 className=\"fraunces-text text-center font-heading text-xl font-medium tracking-normal\">{greeting}</h1>\n      <div className=\"w-full max-w-measure\">\n        <PromptComposer\n          ref={composerRef}\n          size=\"lg\"\n          value={value}\n          onValueChange={setValue}\n          onSubmit={(v) => { onSubmit(v); setValue('') }}\n          onMic={onMic}\n          leading={onAdd ? (\n            <Button type=\"button\" size=\"icon\" variant=\"ghost\" className=\"rounded-full border border-border\" aria-label=\"Add files or context\" onClick={onAdd}>\n              <Icon name=\"add\" />\n            </Button>\n          ) : null}\n          modes={[\n            { value: 'ask', label: 'Ask', ai: true, placeholder: 'Ask anything. Type / for skills, @ to add context' },\n            { value: 'agent', label: 'Agent', icon: <Icon name=\"person\" />, placeholder: 'What should your agent take on?' },\n          ]}\n        />\n      </div>\n      <SuggestedPrompts\n        layout=\"cards\"\n        label=\"Starters\"\n        className=\"w-full max-w-measure\"\n        suggestions={starters.map((s) => ({ label: s.title, detail: s.detail, prompt: s.prompt }))}\n        onPick={(prompt) => { setValue(prompt); composerRef.current?.focus() }}\n      />\n    </section>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/quill/ai-home.tsx"
    }
  ],
  "meta": {
    "intent": [
      "ai"
    ],
    "use_when": "An app has a page whose main job is talking to its AI assistant, and people land on it with nothing typed yet.",
    "not_for": "you only need the box, inside a page that is about something else → prompt-composer; two people are messaging; there is no AI → chat"
  },
  "docs": "An AI assistant's start page — a soft AI glow, a greeting, the large composer with Ask/Agent modes, and starter cards. Do: Keep the AI glow to this one start page. Don't: Add the glow behind other sections or pages — it marks the AI home, and repeated it becomes decoration. Use prompt-composer when you only need the box, inside a page that is about something else. Use chat when two people are messaging; there is no AI.",
  "categories": [
    "ai"
  ],
  "type": "registry:block"
}