@liveblocks/react-ui
Version:
A set of React pre-built components for the Liveblocks products. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.
1 lines • 910 B
Source Map (JSON)
{"version":3,"file":"contexts.cjs","sources":["../../../src/primitives/AiMessage/contexts.ts"],"sourcesContent":["import type { AiOpaqueToolInvocationProps } from \"@liveblocks/core\";\nimport { createContext, useContext } from \"react\";\n\nexport const AiToolInvocationContext =\n createContext<AiOpaqueToolInvocationProps | null>(null);\n\nexport function useAiToolInvocationContext() {\n const context = useContext(AiToolInvocationContext);\n\n if (context === null) {\n throw new Error(\n \"This component must be used within a tool's render method.\"\n );\n }\n\n return context;\n}\n"],"names":["createContext","useContext"],"mappings":";;;;AAGa,MAAA,uBAAA,GACXA,oBAAkD,IAAI,EAAA;AAEjD,SAAS,0BAA6B,GAAA;AAC3C,EAAM,MAAA,OAAA,GAAUC,iBAAW,uBAAuB,CAAA,CAAA;AAElD,EAAA,IAAI,YAAY,IAAM,EAAA;AACpB,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,4DAAA;AAAA,KACF,CAAA;AAAA,GACF;AAEA,EAAO,OAAA,OAAA,CAAA;AACT;;;;;"}