Add GPT-5 image calculation #69
Merged
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.
This PR introduces the GPT-5 model into the calculation.
Resolves #68
This pull request also introduces enhancements to the
ImageEditor
component to improve the user experience when selecting and editing image presets, and adds a new model to themodelStore
. The main changes include better handling of the "Custom" preset, improved input control for preset selection, and automatic updating of preset labels when image dimensions match a known preset.ModelStore update:
models
array inmodelStore
.ImageEditor improvements:
useMemo
anduseState
hooks to manage preset options and input values, ensuring the "Custom" option is consistently available and input behavior is smoother. [1] [2]Autocomplete
component to use the unifiedallPresetOptions
, maintain input values per image, and reset the input when options are opened or changed. This prevents filtering out the "Custom" option and keeps the dropdown user-friendly.height
orwidth
so that if the new dimensions match a preset, the corresponding preset label is automatically selected; otherwise, the preset is set to "Custom". [1] [2]