Skip to content

Conversation

celestial-vault
Copy link
Contributor

@celestial-vault celestial-vault commented Jul 26, 2025

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

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • ♻️ Refactor Changes
  • 💅 Cosmetic Changes
  • 📚 Documentation update
  • 🏃 Workflow Changes

Pre-flight Checklist

  • Changes are limited to a single feature, bugfix or chore (split larger changes into separate PRs)
  • Tests are passing (npm test) and code is formatted and linted (npm run format && npm run lint)
  • I have created a changeset using npm run changeset (required for user-facing changes)
  • I have reviewed contributor guidelines

Screenshots

Additional Notes


Important

Refactor to replace ChatSettings object with separate mode, preferredLanguage, and openaiReasoningEffort fields, affecting state management, UI components, and API configurations.

  • Behavior:
    • Replaces ChatSettings object with mode, preferredLanguage, and openaiReasoningEffort fields across the codebase.
    • Updates functions like togglePlanActMode to use mode directly instead of ChatSettings.
  • State Management:
    • Modifies ExtensionStateContext to manage mode, preferredLanguage, and openaiReasoningEffort separately.
    • Updates getModeSpecificFields and normalizeApiConfiguration to handle new fields.
  • UI Components:
    • Refactors components in webview-ui/src/components/settings/providers to use new fields.
    • Updates ApiConfigurationSection and FeatureSettingsSection to reflect changes.
  • Misc:
    • Removes ChatSettings related files and functions, including chat-settings-conversion.ts.

This description was created by Ellipsis for 54cd8e5. You can customize this summary. It will automatically update as commits are pushed.

Copy link

changeset-bot bot commented Jul 26, 2025

⚠️ No Changeset found

Latest commit: 54cd8e5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@celestial-vault celestial-vault force-pushed the remove-chatsettings-object branch from 42db4da to 9443ae1 Compare July 26, 2025 16:58
Copy link
Contributor

@arafatkatze arafatkatze left a 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.

Copy link
Contributor

Coverage Report

Extension Coverage

Base branch: 46%

PR branch: 47%

✅ Coverage increased or remained the same

Webview Coverage

Base 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

@arafatkatze arafatkatze merged commit 0e56272 into main Jul 29, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants