From 47c663bca23551838cd14172db25cdc8bcce405b Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 18:28:06 +0000 Subject: [PATCH 1/3] feat: replace grok-4 with grok-3-fast --- lib/utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/index.ts b/lib/utils/index.ts index 7416f341..a4a94429 100644 --- a/lib/utils/index.ts +++ b/lib/utils/index.ts @@ -30,7 +30,7 @@ export function getModel() { }) // Optionally, add a check for credit status or skip xAI if credits are exhausted try { - return xai('grok-4-fast-non-reasoning') + return xai('grok-3-fast') } catch (error) { console.warn('xAI API unavailable, falling back to OpenAI:') } From d8cea9f742bd55d4216d135744c3cdb9725d1092 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 23:26:54 +0000 Subject: [PATCH 2/3] fix: simplify image component to fix display issue --- components/search-results-image.tsx | 142 +++++----------------------- dev.log | 13 +++ 2 files changed, 37 insertions(+), 118 deletions(-) create mode 100644 dev.log diff --git a/components/search-results-image.tsx b/components/search-results-image.tsx index 50229d01..0b555b3c 100644 --- a/components/search-results-image.tsx +++ b/components/search-results-image.tsx @@ -2,24 +2,6 @@ 'use client' import { Card, CardContent } from '@/components/ui/card' -import { - Dialog, - DialogContent, - DialogDescription, - DialogHeader, - DialogTitle, - DialogTrigger -} from '@/components/ui/dialog' -import { - Carousel, - type CarouselApi, - CarouselContent, - CarouselItem, - CarouselNext, - CarouselPrevious -} from '@/components/ui/carousel' -import { useEffect, useState } from 'react' -import { PlusCircle } from 'lucide-react' import { motion } from 'framer-motion' import 'glassmorphic/glassmorphic.css' @@ -31,112 +13,36 @@ interface SearchResultsImageSectionProps { export const SearchResultsImageSection: React.FC< SearchResultsImageSectionProps > = ({ images, query }) => { - const [api, setApi] = useState() - const [current, setCurrent] = useState(0) - const [count, setCount] = useState(0) - const [selectedIndex, setSelectedIndex] = useState(0) - - // Update the current and count state when the carousel api is available - useEffect(() => { - if (!api) { - return - } - - setCount(api.scrollSnapList().length) - setCurrent(api.selectedScrollSnap() + 1) - - api.on('select', () => { - setCurrent(api.selectedScrollSnap() + 1) - }) - }, [api]) - - // Scroll to the selected index - useEffect(() => { - if (api) { - api.scrollTo(selectedIndex, true) - } - }, [api, selectedIndex]) - if (!images || images.length === 0) { return
No images found
} return ( -
- {images.slice(0, 4).map((image: any, index: number) => ( - - - setSelectedIndex(index)} - whileHover={{ scale: 1.05 }} - whileTap={{ scale: 0.95 }} - > - - - {image ? ( - {`Image - (e.currentTarget.src = '/images/placeholder-image.png') - } - /> - ) : ( -
- )} - - - {index === 3 && images.length > 4 && ( -
- -
+
+ {images.map((image: any, index: number) => ( + + + + {image ? ( + {`Image + (e.currentTarget.src = '/images/placeholder-image.png') + } + /> + ) : ( +
)} - - - - - Search Images - {query} - -
- - - {images.map((img, idx) => ( - -
- {`Image - (e.currentTarget.src = - '/images/placeholder-image.png') - } - /> -
-
- ))} -
-
- - Previous - - - Next - -
-
-
- {current} of {count} -
-
-
-
+ + + ))}
) diff --git a/dev.log b/dev.log new file mode 100644 index 00000000..849064ea --- /dev/null +++ b/dev.log @@ -0,0 +1,13 @@ +$ next dev --turbo + ▲ Next.js 15.5.4 (Turbopack) + - Local: http://localhost:3000 + - Network: http://192.168.0.2:3000 + - Environments: .env + - Experiments (use with caution): + · serverActions + + ✓ Starting... +Attention: Next.js now collects completely anonymous telemetry regarding usage. +This information is used to shape Next.js' roadmap and prioritize features. +You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: +https://nextjs.org/telemetry From ff694836721a0840921583c3eecbd2e0dabef8e4 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 12 Nov 2025 06:53:52 +0000 Subject: [PATCH 3/3] revert: Revert simplification of image component --- components/search-results-image.tsx | 142 +++++++++++++++++++++++----- 1 file changed, 118 insertions(+), 24 deletions(-) diff --git a/components/search-results-image.tsx b/components/search-results-image.tsx index 0b555b3c..50229d01 100644 --- a/components/search-results-image.tsx +++ b/components/search-results-image.tsx @@ -2,6 +2,24 @@ 'use client' import { Card, CardContent } from '@/components/ui/card' +import { + Dialog, + DialogContent, + DialogDescription, + DialogHeader, + DialogTitle, + DialogTrigger +} from '@/components/ui/dialog' +import { + Carousel, + type CarouselApi, + CarouselContent, + CarouselItem, + CarouselNext, + CarouselPrevious +} from '@/components/ui/carousel' +import { useEffect, useState } from 'react' +import { PlusCircle } from 'lucide-react' import { motion } from 'framer-motion' import 'glassmorphic/glassmorphic.css' @@ -13,36 +31,112 @@ interface SearchResultsImageSectionProps { export const SearchResultsImageSection: React.FC< SearchResultsImageSectionProps > = ({ images, query }) => { + const [api, setApi] = useState() + const [current, setCurrent] = useState(0) + const [count, setCount] = useState(0) + const [selectedIndex, setSelectedIndex] = useState(0) + + // Update the current and count state when the carousel api is available + useEffect(() => { + if (!api) { + return + } + + setCount(api.scrollSnapList().length) + setCurrent(api.selectedScrollSnap() + 1) + + api.on('select', () => { + setCurrent(api.selectedScrollSnap() + 1) + }) + }, [api]) + + // Scroll to the selected index + useEffect(() => { + if (api) { + api.scrollTo(selectedIndex, true) + } + }, [api, selectedIndex]) + if (!images || images.length === 0) { return
No images found
} return ( -
- {images.map((image: any, index: number) => ( - - - - {image ? ( - {`Image - (e.currentTarget.src = '/images/placeholder-image.png') - } - /> - ) : ( -
+
+ {images.slice(0, 4).map((image: any, index: number) => ( + + + setSelectedIndex(index)} + whileHover={{ scale: 1.05 }} + whileTap={{ scale: 0.95 }} + > + + + {image ? ( + {`Image + (e.currentTarget.src = '/images/placeholder-image.png') + } + /> + ) : ( +
+ )} + + + {index === 3 && images.length > 4 && ( +
+ +
)} - - - + + + + + Search Images + {query} + +
+ + + {images.map((img, idx) => ( + +
+ {`Image + (e.currentTarget.src = + '/images/placeholder-image.png') + } + /> +
+
+ ))} +
+
+ + Previous + + + Next + +
+
+
+ {current} of {count} +
+
+
+
))}
)