Touchbar widget that would allow you to type into it

This might seem a little far fetched or useless but hear me out:
You tap an a touchbar button, and the entire touchbar turns into a text input field in which you can type. Once you press enter, your typed text would be passed to a javascript/applescript script, and the touchbar would return to normal.

The use I can currently think of for this would be using your touch bar to execute terminal commands (your screen is full, don't want to open a terminal and block your view of other windows, but you need to run a quick command), and I'm sure there would be many other cool uses for this as well.

I don't know how possible this would be with btt having to intercept your keystrokes, but it sure would be a cool feature.