docs icon indicating copy to clipboard operation
docs copied to clipboard

feat: Improved documentation for Actions

Open PlebeiusGaragicus opened this issue 5 months ago • 0 comments

Check Existing Issues

  • [x] I have searched the existing issues and discussions.

Problem Description

Given the example Action button code:

class Action:
    class Valves(BaseModel):
        pass

    def __init__(self):
        self.valves = self.Valves()
        pass

    async def action(
        self,
        body: dict,
        __user__=None,
        __event_emitter__=None,
        __event_call__=None,
    ) -> Optional[dict]:
        print(f"action:{__name__}")

        response = await __event_call__(
            {
                "type": "input", # <-- WHAT OTHER OPTIONS EXIST?
                "data": {
                    "title": "write a message",
                    "message": "here write a message to append",
                    "placeholder": "enter your message",
                },
            }
        )

I'd like to know what other options are available other than "type": "input" - I'm unable to find a comprehensive list of options in the docs. Perhaps this is so new they haven't been written yet?

Desired Solution you'd like

Improved documentation.

Alternatives Considered

Creating a comprehensive list of example actions so that I can just review the code.

Additional Context

No response

PlebeiusGaragicus avatar May 19 '25 01:05 PlebeiusGaragicus