UNPKG

@assistant-ui/react

Version:

Typescript/React library for AI Chat

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