BB.TUI.State.Commands (BB.TUI v0.1.0)

Copy Markdown View Source

Command palette and inline argument-edit state, split out of BB.TUI.State.

available is the discovered command list; selected is the highlighted row; result is the last execution result; executing is a marker held while a command runs; edit_mode?/focused_arg/form_values drive the inline argument editor. available is seeded when BB.TUI.App starts.

Summary

Types

t()

@type t() :: %BB.TUI.State.Commands{
  available: [term()],
  edit_mode?: boolean(),
  executing: term() | nil,
  focused_arg: non_neg_integer(),
  form_values: %{required(atom()) => %{required(atom()) => String.t()}},
  result: {:ok, term()} | {:error, term()} | nil,
  selected: non_neg_integer()
}