Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Apr 15, 2025

Context

Similar to #2376, I think diff editing settings should be per-profile as the ability to use diffs varies widely from model to model. So I moved the diff enabled flag and the fuzzy match config into the provider settings and removed the now empty Advanced settings.

Screenshot 2025-04-15 at 2 03 57 PM


Important

Move diff editing settings to provider-specific configurations and update UI components accordingly.

  • Behavior:
    • Move diffEnabled and fuzzyMatchThreshold settings to provider-specific configurations in ProviderSettingsManager.ts.
    • Remove AdvancedSettings.tsx and integrate diff settings into ApiOptions.tsx and DiffSettingsControl.tsx.
  • Migration:
    • Add migrateDiffSettings() in ProviderSettingsManager.ts to migrate existing global settings to provider-specific settings.
    • Update initialize() in ProviderSettingsManager.ts to handle new migration.
  • UI Components:
    • Add DiffSettingsControl to ApiOptions.tsx for managing diff settings per provider.
    • Remove AdvancedSettings section from SettingsView.tsx.
  • Tests:
    • Update ProviderSettingsManager.test.ts to test migration and initialization of diff settings.
    • Add tests for DiffSettingsControl in ApiOptions.test.tsx.

This description was created by Ellipsis for bcc7e8d. It will automatically update as commits are pushed.

@mrubens mrubens requested a review from cte as a code owner April 15, 2025 18:04
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Apr 15, 2025
const { t } = useAppTranslation()

const handleDiffEnabledChange = useCallback(
(e: any) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider replacing the generic type for the event parameter with a more specific type (e.g., React.ChangeEvent<HTMLInputElement>) to improve type safety.

Suggested change
(e: any) => {
(e: React.ChangeEvent<HTMLInputElement>) => {

interface DiffSettingsControlProps {
diffEnabled?: boolean
fuzzyMatchThreshold?: number
onChange: (field: "diffEnabled" | "fuzzyMatchThreshold", value: any) => void
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The onChange prop currently uses an any type for its value. Consider refining it so that when field is 'diffEnabled', value is a boolean, and when field is 'fuzzyMatchThreshold', value is a number. This would improve type-safety.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 15, 2025
@changeset-bot
Copy link

changeset-bot bot commented Apr 15, 2025

⚠️ No Changeset found

Latest commit: bcc7e8d

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

@mrubens mrubens merged commit 648c6e7 into main Apr 15, 2025
12 checks passed
@mrubens mrubens deleted the move_diff_settings_to_provider_settings branch April 15, 2025 18:59
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants