Sema4AI/actions

There should be a better link from the `@action` arguments and the `input.json` contents

kariharju opened this issue · 0 comments

The problem is that there's currently no link from the @action arguments that the user has created in code to the input.json. What should happen is that the extension (prior to running an action) should get the proper metadata to collect the arguments so that it could do a pre-validation of the input_<action-name>.json.

Also, it should probably do code-analysis to verify that it's actually correct.

With this info, it should also be possible to get OAuth2 information from the action itself instead of requiring it to be entered as vscode:request:oauth2.

The original issue was:

VS Code asks the user to add input.json parameters for action that has no input arguments

The error is visible in VS Code extension, but I assume the validation logic comes from Action Server
Repro:

  1. Create new action in VS Code that has no input arguments
  2. Run the Action from the VS Code sidebar

Result: VS Code asks user to config input parameter in devdata/input.json.
Expected: No input args so query is misplaced