{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "memory-chips-demo",
  "title": "Memory Chips Demo",
  "description": "A worked example of Memory Chips: Everything an assistant has been told to remember about someone, each one removable on its own.",
  "registryDependencies": [
    "https://ui.tinkererslabs.com/r/memory-chips.json"
  ],
  "files": [
    {
      "path": "components/demos/memory-chips-demo.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { MemoryChips } from \"@/registry/default/memory-chips/memory-chips\"\n\nconst remembered = [\n  { id: \"1\", text: \"Prefers pnpm\" },\n  { id: \"2\", text: \"Works in TypeScript\", source: \"from a PR review\" },\n  { id: \"3\", text: \"Uses merge commits, never squash\" },\n  { id: \"4\", text: \"Timezone is IST\" },\n]\n\nexport function MemoryChipsDemo() {\n  const [memories, setMemories] = React.useState(remembered)\n\n  return (\n    <div className=\"w-full max-w-md space-y-3\">\n      <MemoryChips\n        memories={memories}\n        onForget={(id) => setMemories((all) => all.filter((m) => m.id !== id))}\n        onForgetAll={() => setMemories([])}\n      />\n\n      {memories.length < remembered.length ? (\n        <button\n          type=\"button\"\n          onClick={() => setMemories(remembered)}\n          className=\"text-muted-foreground hover:text-foreground text-xs underline underline-offset-4\"\n        >\n          Put them back\n        </button>\n      ) : null}\n    </div>\n  )\n}\n",
      "type": "registry:example"
    }
  ],
  "type": "registry:example"
}