-
-
Notifications
You must be signed in to change notification settings - Fork 26
feat: img gen #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: img gen #263
Conversation
Fixes #262
Reviewer's Guide by SourceryThis pull request implements the image generation feature. It includes the core logic for creating images, managing UI states during the process, handling errors, adding generated images to the chat history, and updating relevant dependencies. A minor refactor to a UI callback is also included. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @lollipopkit - I've reviewed your changes - here's some feedback:
Overall Comments:
- The
finally
block in_onCreateImg
appears to duplicate cleanup logic handled by_onErr
in thecatch
block; consider removing thefinally
block. - Consider whether notifying the UI and scrolling twice in
_onCreateImg
(once for the empty message, once after adding images) is necessary or if a single update after image generation suffices.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
final assistReply = ChatHistoryItem.gen( | ||
role: ChatRole.assist, | ||
content: [], | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Revisit adding an empty assist reply before the async call.
Since assistReply is added to workingChat.items before initiating the image creation, if the request fails the empty entry remains. Consider whether it should be removed or marked as failed so that the chat history remains consistent.
Fixes #262
Summary by Sourcery
Update the image generation process to provide immediate visual feedback and ensure reliable UI state management.
Bug Fixes:
Enhancements:
Chores:
openai_dart
andfl_lib
dependencies to newer versions.