-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: enable Save button when clicking "Enable reasoning" checkbox #7101
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -229,7 +229,9 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t | |
|
|
||
| // Don't treat initial sync from undefined to a defined value as a user change | ||
| // This prevents the dirty state when the component initializes and auto-syncs the model ID | ||
| const isInitialSync = previousValue === undefined && value !== undefined | ||
| // Exception: enableReasoningEffort is a user-controlled checkbox that should always trigger changes | ||
| const isInitialSync = | ||
| previousValue === undefined && value !== undefined && field !== "enableReasoningEffort" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While this fix works for
Should we investigate if these need the same treatment? Or perhaps consider a more scalable solution like maintaining a Set of user-controlled fields? |
||
|
|
||
| if (!isInitialSync) { | ||
| setChangeDetected(true) | ||
|
|
||
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.
Is this approach intentional? Hard-coding field names here creates a maintenance burden. Could we consider using a more maintainable pattern like: