chore: adjust default model name#7634
Merged
richardshiue merged 1 commit intoAppFlowy-IO:mainfrom Mar 27, 2025
Merged
Conversation
Contributor
Reviewer's Guide by SourceryThis pull request adjusts the default model name and introduces internationalization (i18n) support for AI model names throughout the application. It also refactors the way the default model is displayed, using a spark icon in some places and the translated 'Auto Model' text in others. The changes affect the AI model selection menus and the AI writer prompt. Sequence diagram for selecting an AI modelsequenceDiagram
participant User
participant _SelectModelMenuState
participant _CurrentModelButton
participant _ModelItem
User->>_CurrentModelButton: Clicks on the current model button
activate _CurrentModelButton
_CurrentModelButton->>_SelectModelMenuState: Shows the popover menu
deactivate _CurrentModelButton
_SelectModelMenuState->>_ModelItem: Renders model items
User->>_ModelItem: Selects a model
activate _ModelItem
_ModelItem->>_SelectModelMenuState: Calls onTap
deactivate _ModelItem
_SelectModelMenuState->>_CurrentModelButton: Updates the selected model
activate _CurrentModelButton
_CurrentModelButton->>_CurrentModelButton: Displays i18n or spark icon if default
deactivate _CurrentModelButton
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
🥷 Ninja i18n – 🛎️ Translations need to be updatedProject
|
| lint rule | new reports | level | link |
|---|---|---|---|
| Missing translation | 29 | warning | contribute (via Fink 🐦) |
Contributor
There was a problem hiding this comment.
Hey @richardshiue - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a comment explaining the purpose of the
AiModelExtensionand itsisDefaultandi18nproperties. - The
_contentmethod in_CurrentModelButtoncould be simplified using a ternary operator.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 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.
49d445c to
9a71ce5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature Preview
PR Checklist
Summary by Sourcery
Adjust the display of the default AI model name in the user interface
Enhancements:
Chores: