smelt.notify¶
Availability: Some functions need the terminal UI; each function below says which.
Status-area toasts. Each call appends the body to smelt.messages and surfaces a one-line summary in the toast row above the prompt. The optional source arg tags the entry in /messages (defaults to "lua"). UiHost-only.
smelt.notify.error¶
Availability: Terminal UI only; raises in headless mode.
Show an error toast (highlighted with the error color) and append the body to the message log. Pass source to tag the /messages entry (e.g. "upgrade"); defaults to "lua".
smelt.notify.info¶
Availability: Terminal UI only; raises in headless mode.
Show an informational toast and append the body to the message log. Pass source to tag the /messages entry; defaults to "lua".
smelt.notify.scoped¶
Types: smelt.notify.Scoped
Availability: Everywhere, including headless mode.
Bind source once and return a small bag that forwards to
smelt.notify.info / smelt.notify.error / smelt.notify.warn with the
source pinned. A plugin opts in with one line at the top of the file:
local notify = smelt.notify.scoped("upgrade")
notify.info("downloading …")
notify.error("/upgrade: spawn failed")
so the per-call-site , "upgrade" repetition goes away. Same toast +
/messages semantics as the underlying calls. Skipped on headless
where smelt.notify isn't bound.
smelt.notify.warn¶
Availability: Terminal UI only; raises in headless mode.
Show a warning toast and append the body to the message log. Pass source to tag the /messages entry; defaults to "lua".