diff --git a/.vscode/settings.json b/.vscode/settings.json index 03182fcf..ddaa4892 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,6 +10,7 @@ "cloudflarestorage", "cmdk", "CredentialsSignin", + "datetime", "Eterna", "exif", "exifr", @@ -33,6 +34,7 @@ "Reala", "skippable", "sonner", + "Streamable", "thephotoblog", "trpc", "unnest", @@ -41,8 +43,7 @@ "WRHGZC", "wxyz", "zadd", - "zrange", - "datetime" + "zrange" ], "files.associations": { "*.css": "tailwindcss" diff --git a/src/photo/form/PhotoForm.tsx b/src/photo/form/PhotoForm.tsx index ca61d471..2fd5ad70 100644 --- a/src/photo/form/PhotoForm.tsx +++ b/src/photo/form/PhotoForm.tsx @@ -25,6 +25,9 @@ import ImageBlurFallback from '@/components/ImageBlurFallback'; import { BLUR_ENABLED } from '@/site/config'; import { Tags, sortTagsObjectWithoutFavs } from '@/tag'; import { formatCount, formatCountDescriptive } from '@/utility/string'; +import { streamImageQuery } from '@/services/openai'; +import { readStreamableValue } from 'ai/rsc'; +import Spinner from '@/components/Spinner'; const THUMBNAIL_SIZE = 300; @@ -116,9 +119,22 @@ export default function PhotoForm({ } }, []); + const [aiTags, setAiTags] = useState(''); + const [isLoadingAi, setIsLoadingAi] = useState(false); + return (