Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: modify credential refresh to support stacked contexts #856

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

g-linville
Copy link
Member

The stacked credentials feature was not working with credential refresh until this PR. The refreshed credential used to be stored into the highest priority context, even if it previously existed in a different context.

For example, say I had credential cred in context one, and then I do gptscript --credential-context two,one <script>. The script uses the cred credential, so it gets refreshed. GPTScript was storing the new refreshed credential in the context two, even though it previously existed in one.

This PR changes it so that refreshed credentials are always stored in the context from which they came.

@g-linville g-linville changed the title fix: refresh credential with correct context fix: modify credential refresh to support stacked contexts Sep 23, 2024
Signed-off-by: Grant Linville <[email protected]>
Signed-off-by: Grant Linville <[email protected]>
Signed-off-by: Grant Linville <[email protected]>
@g-linville g-linville merged commit ec0c019 into gptscript-ai:main Sep 23, 2024
10 checks passed
@g-linville g-linville deleted the stacked-cred-refresh branch September 23, 2024 20:09
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.

3 participants