feat(AI): Replace Imagen with Nano Banana usage#985
feat(AI): Replace Imagen with Nano Banana usage#985DellaBitta wants to merge 9 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces the 'Imagen Generation' feature with a new 'Nano Banana' mode, transitioning from a dedicated image generation model to a generative model capable of interleaved text and image output. Key changes include updating the application state to support the nanobanana mode, adding aspect ratio selection and response modality controls in the sidebar, and implementing the NanoBananaView component. Feedback highlights a missing dependency in a useCallback hook within NanoBananaView.tsx which could lead to stale state usage, and a redundant state assignment in RightSidebar.tsx.
| <option key={level} value={level}> | ||
| {level.replace(/_/g, " ")} | ||
| <option value="">None</option> | ||
| {["1:1", "3:2", "2:3", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"].map((ar) => ( |
There was a problem hiding this comment.
I thought we were only going to put a sample of aspect ratio text in the placeholder and not provide a UI select element? Is this because there are a limited number of aspect ratios that the model can handle?
There was a problem hiding this comment.
Yeah, it turns out that there's only a select set of supported aspect ratios. Seems easier to toy with if there's a pulldown, but I can remove the pull down and bake the aspect ratio into the sample prompts instead, if that's what you'd rather after all.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request replaces the 'Imagen Generation' feature with 'Nano Banana,' transitioning from a dedicated image generation model to a generative model that supports interleaved text and image modalities. Key changes include updating UI components like MainLayout, RightSidebar, and PromptInput to handle new model parameters and aspect ratios, and replacing ImagenView with the new NanoBananaView. Review feedback identifies a critical security risk due to hardcoded Firebase credentials, the use of 'as any' for type casting, duplicated logic in the sidebar, and the need to properly handle content filtering reasons in the new view.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request replaces the "Imagen Generation" feature with "Nano Banana," transitioning to a generative model that supports interleaved text and image modalities. Key updates include renaming application modes, adding controls for response modalities and aspect ratios in the sidebar, and implementing the NanoBananaView component. Review feedback identifies several missing CSS classes in the new view component and suggests enhancing prompt block error handling and updating legacy HTML identifiers for better consistency.
Update the
ai-react-appto:Use aspect ratio 21:9for instance.