-
Notifications
You must be signed in to change notification settings - Fork 7k
remove chatSettings object #5178
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
Conversation
|
42db4da
to
9443ae1
Compare
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.
This PR makes perfect sense and I like this sort of refactoring to remove redundancies.
I added some minor nits that could be covered in a followup/later but overall this is good.
I have tested language settings change and also the reasoning effort change.
Coverage ReportExtension CoverageBase branch: 46% PR branch: 47% ✅ Coverage increased or remained the same Webview CoverageBase branch: 17% PR branch: 17% ✅ Coverage increased or remained the same Overall Assessment✅ Test coverage has been maintained or improved Last updated: 2025-07-29T19:19:37.049709 |
Description
We remove the chatSettings object in favor of three flat fields, which it contained:
Mode, preferredLanguage, and openaiReasoningEffort.
These three fields were not related and should not have been grouped into an object.
This clears the way for further efforts related to our state.
Test Procedure
Test switching modes using both the plain act toggle and the two act mode button within the chat when Cline parses "act mode".
Test that images and text are still sent correctly with the Act Mode switch.
Test that preferred language is set and used by the model, and test that OpenAI reasoning effort is switched and saved correctly.
Type of Change
Pre-flight Checklist
npm test
) and code is formatted and linted (npm run format && npm run lint
)npm run changeset
(required for user-facing changes)Screenshots
Additional Notes
Important
Refactor to replace
ChatSettings
object with separatemode
,preferredLanguage
, andopenaiReasoningEffort
fields, affecting state management, UI components, and API configurations.ChatSettings
object withmode
,preferredLanguage
, andopenaiReasoningEffort
fields across the codebase.togglePlanActMode
to usemode
directly instead ofChatSettings
.ExtensionStateContext
to managemode
,preferredLanguage
, andopenaiReasoningEffort
separately.getModeSpecificFields
andnormalizeApiConfiguration
to handle new fields.webview-ui/src/components/settings/providers
to use new fields.ApiConfigurationSection
andFeatureSettingsSection
to reflect changes.ChatSettings
related files and functions, includingchat-settings-conversion.ts
.This description was created by
for 54cd8e5. You can customize this summary. It will automatically update as commits are pushed.