UNPKG

@assistant-ui/react

Version:

React components for AI chat.

14 lines 492 B
// src/primitive-hooks/attachment/useAttachmentRemove.ts import { useCallback } from "react"; import { useAttachmentRuntime } from "../../context/react/AttachmentContext.mjs"; var useAttachmentRemove = () => { const attachmentRuntime = useAttachmentRuntime(); const handleRemoveAttachment = useCallback(() => { attachmentRuntime.remove(); }, [attachmentRuntime]); return handleRemoveAttachment; }; export { useAttachmentRemove }; //# sourceMappingURL=useAttachmentRemove.mjs.map