Skip to content

Conversation

@gtaylor
Copy link
Contributor

@gtaylor gtaylor commented Apr 6, 2025

Context

Values weren't being saved to the settings store, preventing switching to newly created profiles. See this Discord thread for screenshots and source code.

Implementation

See diff. Explicitly call saveConfig after changing configurations. I'm not sure that I love taking the name from currentApiConfigName but we'd need to rework the API quite a bit to allow for an explicit name param.

How to Test

Create a custom extension that calls these APIs and do something like this:

npm run build && code --uninstall-extension rooveterinaryinc.roo-cline && code --install-extension bin/roo-cline-3.11.4.vsix

Important

In api.ts, setConfiguration now persists settings by calling saveConfig with currentApiConfigName or "default".

  • Behavior:
    • In api.ts, setConfiguration now calls saveConfig to persist settings using currentApiConfigName or "default" if not provided.
  • Testing:
    • Instructions provided to test the change by creating a custom extension and using specific npm and VS Code commands.

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

Values weren't being saved to the settings store, preventing
switching to newly created profiles.
@changeset-bot
Copy link

changeset-bot bot commented Apr 6, 2025

⚠️ No Changeset found

Latest commit: 7d2365c

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

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 6, 2025

public async setConfiguration(values: RooCodeSettings) {
await this.sidebarProvider.setValues(values)
await this.sidebarProvider.providerSettingsManager.saveConfig(values.currentApiConfigName || "default", values)
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding error handling around the call to saveConfig. If persisting the configuration fails, it could interrupt subsequent UI updates. Wrapping this call in try/catch (or ensuring errors are caught upstream) will improve robustness.

@dosubot dosubot bot added the bug Something isn't working label Apr 6, 2025
Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

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

Works for me! @cte?

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 6, 2025
@cte cte merged commit 57d9731 into RooCodeInc:main Apr 6, 2025
21 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Apr 6, 2025
SmartManoj pushed a commit to SmartManoj/Raa-Code that referenced this pull request May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants