UNPKG

@assistant-ui/react

Version:

TypeScript/React library for AI Chat

15 lines (14 loc) 387 B
"use client"; // src/primitives/thread/ThreadEmpty.tsx import { useThread } from "../../context/index.js"; var ThreadPrimitiveEmpty = ({ children }) => { const empty = useThread((u) => u.messages.length === 0); return empty ? children : null; }; ThreadPrimitiveEmpty.displayName = "ThreadPrimitive.Empty"; export { ThreadPrimitiveEmpty }; //# sourceMappingURL=ThreadEmpty.js.map