actions icon indicating copy to clipboard operation
actions copied to clipboard

Provide a way to have dependency injection from actions

Open fabioz opened this issue 1 year ago • 0 comments

Why & who

For instance, sema4ai-di-client uses a private api to get the x-action-context. It should be able to get the Request at any point in the program.

Feature or enhancement

The API still needs to be decided.

Maybe something as the code below could be an option:

@inject_action_context
def my_method(request: Request, action: IAction, other_arg, **kwargs):
    ...

Solution & alternative

No response

fabioz avatar Oct 17 '24 13:10 fabioz