feat: multimodal AI event creation with image support #1

Merged
old4ever merged 20 commits from image-parse into main 2026-04-07 15:21:28 -04:00
2 changed files with 12 additions and 11 deletions
Showing only changes of commit a7716d87df - Show all commits

View File

@@ -1,9 +1,9 @@
import Image from "next/image";
import { Button } from "@/components/ui/button";
import { Textarea } from "@/components/ui/textarea";
import { Card } from "@/components/ui/card";
import { ImagePicker } from "@/components/image-picker";
import { X } from "lucide-react";
import Image from "next/image";
import { ImagePicker } from "@/components/image-picker";
import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
import { Textarea } from "@/components/ui/textarea";
interface AIToolbarProps {
isAuthenticated: boolean;
@@ -53,13 +53,14 @@ export const AIToolbar = ({
onChange={(e) => setAiPrompt(e.target.value)}
/>
{imagePreview && (
<div className="relative mt-2 inline-block">
<div className="relative mt-2 inline-block max-w-full overflow-hidden">
<Image
src={imagePreview}
alt="Attached event flyer"
className="h-20 rounded-md object-cover border"
width={80}
height={80}
unoptimized
/>
<Button
variant="destructive"

View File

@@ -1,7 +1,6 @@
import { ReactNode } from "react";
import type { ReactNode } from "react";
import { toast } from "sonner";
const IMAGE_EXTENSIONS = [".png", ".jpg", ".jpeg", ".webp"];
import { IMAGE_EXTENSIONS } from "@/lib/constants";
const getFileType = (file: File): "ics" | "image" | null => {
const name = file.name.toLowerCase();
@@ -53,7 +52,8 @@ export const DragDropContainer = ({
};
return (
<div
<section
aria-label="Drag and drop file import area"
onDragOver={handleDragOver}
onDragLeave={handleDragLeave}
onDrop={handleDrop}
@@ -67,6 +67,6 @@ export const DragDropContainer = ({
Drag & Drop *.ics or an event screenshot here
</div>
</div>
</div>
</section>
);
};