Support default values for Secrets even if the action context is provided
What is wrong
See: https://sema4ai.slack.com/archives/C0107FK9JR2/p1724759641973369 for details.
Issue: SEMA4AI-VSCODE-X-ACTION-CONTEXT is set from VSCode in any call now (even if there's no OAuth2 info to be passed) and when that's set it'll try to get all the secrets/oauth2 secrets from the context, so, the default values will never be picked up when running from VSCode.
This happens because in sema4ai.actions it doesn't eagerly load the secrets to check if it's valid and just considers that if an action context is available it should always use it (and in this case it turns out that it's invalid).
As a note, the workaround is setting the actual secrets in the devdata/<action_name>.json when running from VSCode (so, not a complete showstopper, but a bit annoying).
System info
Windows, sema4ai-actions 0.10.0
Example script
No response
Example failing when running from VSCode (without setting secrets in the json):
@action
def action_with_default_secret(
my_password: Secret = Secret.model_validate("my-default-secret"),
) -> str:
"""
This is an action that requires a secret but has a default value for it.
"""
return my_password.value
Note: started to create test (which still doesn't reproduce the issue) in the branch issue/96