Skip to content

Revert "Better encapsulation for API config"#1394

Merged
mrubens merged 1 commit intomainfrom
fix_context_proxy
Mar 5, 2025
Merged

Revert "Better encapsulation for API config"#1394
mrubens merged 1 commit intomainfrom
fix_context_proxy

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Mar 5, 2025

This reverts commit 86401fa.


Important

Reverts encapsulation of API configuration, removing getApiConfiguration and updateApiConfiguration methods from ContextProxy and adjusting related tests.

  • Revert Changes:
    • Remove getApiConfiguration and updateApiConfiguration methods from ContextProxy in contextProxy.ts.
    • Remove related tests from contextProxy.test.ts.
    • Revert ClineProvider.ts to handle API configuration directly without ContextProxy methods.
  • Tests:
    • Remove tests for getApiConfiguration and updateApiConfiguration in ClineProvider.test.ts.
    • Adjust tests in ClineProvider.test.ts to reflect direct handling of API configuration.
  • Misc:
    • Remove ApiConfiguration import from contextProxy.ts and contextProxy.test.ts.

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

@mrubens mrubens requested a review from cte as a code owner March 5, 2025 16:05
@changeset-bot
Copy link

changeset-bot bot commented Mar 5, 2025

⚠️ No Changeset found

Latest commit: f683e45

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:L This PR changes 100-499 lines, ignoring generated files. label Mar 5, 2025
@mrubens mrubens merged commit 7e4761f into main Mar 5, 2025
13 of 14 checks passed
@mrubens mrubens deleted the fix_context_proxy branch March 5, 2025 16:08
const promises: Promise<any>[] = []

// For each property in apiConfiguration, update the appropriate state
Object.entries(apiConfiguration).forEach(([key, value]) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

The updateApiConfiguration implementation now iterates over the apiConfiguration object's entries and updates secrets and global state directly. Consider extracting this logic into a helper function for improved clarity and reduced redundancy if it recurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant