Add getCallbackUri to the HostProvider #5361
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resubmission of #5322 with fixes for test files.
The original PR broke the tests because the constructor of the HostProvider was updated in
main
after the PR was created. We need to run the tests against HEAD when the PR is merged, not just when it is sent for review.Adds a util function to create a mock HostProvider for tests.
Important
Adds
getCallbackUri
toHostProvider
and refactors tests to use a mock setup for improved testability.getCallbackUri
method toHostProvider
to return a callback URI for Cline.HostProvider.initialize()
to includegetCallbackUri
parameter inhost-provider.ts
.AuthHandler.getCallbackUri()
to throw an error if not enabled inAuthHandler.ts
.setVscodeHostProviderMock
inhost-provider-test-utils.ts
for consistent test setup.FileContextTracker.test.ts
,index.test.ts
,TerminalProcess.test.ts
, andcline-api.test.ts
to usesetVscodeHostProviderMock
.maybeSetupHostProviders
inextension.ts
andsetupHostProvider
incline-core.ts
to usegetCallbackUri
.This description was created by
for b80ec9a. You can customize this summary. It will automatically update as commits are pushed.