@assistant-ui/react
Version:
Typescript/React library for AI Chat
13 lines • 338 B
JavaScript
"use client";
import { useThread } from "../../context";
const ThreadPrimitiveEmpty = ({
children
}) => {
const empty = useThread((u) => u.messages.length === 0);
return empty ? children : null;
};
ThreadPrimitiveEmpty.displayName = "ThreadPrimitive.Empty";
export {
ThreadPrimitiveEmpty
};
//# sourceMappingURL=ThreadEmpty.js.map