Break down the monolithic handleAiCreate into focused helpers (sendAiRequest, persistAiEvents, populateEventForm), add client-side image file validation before upload, and use toast.promise finally callback for loading state cleanup.
Break down the monolithic handleAiCreate into focused helpers (sendAiRequest, persistAiEvents, populateEventForm), add client-side image file validation before upload, and use toast.promise finally callback for loading state cleanup.