@assistant-ui/react
Version:
TypeScript/React library for AI Chat
9 lines • 450 B
JavaScript
"use client";
import { useAssistantState } from "../../context/index.js";
// TODO should this be renamed to IsRunning?
export const MessagePartPrimitiveInProgress = ({ children }) => {
const isInProgress = useAssistantState(({ part }) => part.status.type === "running");
return isInProgress ? children : null;
};
MessagePartPrimitiveInProgress.displayName = "MessagePartPrimitive.InProgress";
//# sourceMappingURL=MessagePartInProgress.js.map