I’m on a plugin that works along the lines of this:
class Example:
def __init__(self):
self.things = []
def request(self, flow):
self.things.append("thing i captured from request")
@command.command('thing.options')
def options(self) -> typing.Sequence[str]:
return self.things # all the things i've capture
@command.command('thing.apply')
@command.argument('choice', type=types.Choice('thing.change'))
def make_change(self, flow: flow.Flow, choice: str) -> None:
# apply the chosen thing to intercepted flow
pass
I’d like it to use it with popup a choice view in a similar way to how console.bodyview
or console.edit.focus
but can’t seem to figure out how to get it to work. Do I need to specify key mappings somewhere or could I auto-invoke console.choose
somehow?
Thanks for any help in advance!