Key sequence with wildcard part

Since GPT has landed in BTT, I tried to find a way to allow BTT to deal with a key sequence like this:

!gpt write a bash script which returns the first line of STDIN in uppercase

A trigger for !gpt is easy, but I couldn't find a way to capture random input following that prompt until an end marker is hit (in this case: \n). The goal of course would be replacing the entire line !gpt ...\n with the answer of GPT.

Is this doable somehow?

Unfortunately I don't think that's possible. The closest you can get is by checking this box, then BTT will popup a text entry box after writing the !gpt command.

I see, the AI actions are better suited for a keyboard shortcut than a key sequence then. Thanks for your reply!