pi-extensions GitHub

pi-toasts

Reroutes extension ctx.ui.notify(...) in interactive TUI mode into small top-right cards that close on their own, instead of permanent rows in the chat transcript. Pi core’s own status, warning, and error lines are unchanged.

Behaviour

Settings (environment)

Variable Default Meaning
PI_TOAST_CAPTURE on Set to 0 to leave ctx.ui.notify unchanged.
PI_TOAST_WIDTH 44 Overlay width in columns (Pi clamps to the terminal).
PI_TOAST_MAX_VISIBLE 3 Maximum stacked cards; oldest dropped when exceeded.
PI_TOAST_TIMEOUT_INFO 4000 Info toast lifetime (ms).
PI_TOAST_TIMEOUT_WARNING 6000 Warning toast lifetime (ms).
PI_TOAST_TIMEOUT_ERROR 8000 Error toast lifetime (ms).

Narrow terminals: the overlay hides when width < 30 or height < 8 (visible(w,h) on the overlay). Lines are truncated with pi-tui’s visibleWidth / truncateToWidth.

Limitations