ratatui-action
Experimental semantic action model for Ratatui applications.
This crate is part of ratatui-labs. It describes application capabilities independently from the
UI surfaces that present or invoke them. APIs are experimental and may change or disappear.
The command palette experiment uses this crate for action identity, metadata, availability, inputs, arguments, and invocation requests.
Usage
Declare semantic actions with stable identifiers. Dispatch remains application-owned; UI surfaces return invocation requests instead of running callbacks.
use ;
let switch_theme = new
.with_category
.with_description
.with_keywords
.with_input;
let close_workspace = new.with_availability;
let mut args = new;
args.insert;
let invocation =
with_args;
assert_eq!;
assert_eq!;
assert!;
API Notes
ActionSpecandActionInvocationuse private fields so the experiment can add validation or change storage without committing to struct literals.ActionSpecstores owned text for now, while accessors expose borrowed text or iterators so the storage can be revisited before publication.ActionInputdescribes required values, not a specific input widget.ActionArgsstores resolved input values byInputId, so dispatch code can ignore which surface collected them.