Pure view function for ExAthena.Chat.Tui. Turns a %State{} into the
list of {widget, %Rect{}} tuples the ex_ratatui runtime needs.
Layout (top-to-bottom):
- Header (1 row) —
provider · model · mode · iter=N · in/out tok · $cost. - Body (flex) — split horizontally 50/50 into:
- Left —
messagesWidgetList (one{Paragraph, 1}per event row). Ifstate.loading? == true, aThrobberis appended. - Right —
detailsWidgetList: full args, full tool results, thinking, tool UI payloads, and every loop event. Wrapped in a titledBlockwith a left border.
- Left —
- Input (3 rows) —
Textareabound tostate.input_refinside a titledBlock. - Footer (1 row) — shortcut hints (changes when a popup is open).
When state.popup != nil, a Popup widget overlays the messages
rect with a centered List.
Summary
Functions
Build the per-frame widget list for the given state and frame.
Build the header status string from a session.
Functions
@spec build_frame(ExAthena.Chat.Tui.State.t(), ExRatatui.Frame.t()) :: [ {struct(), ExRatatui.Layout.Rect.t()} ]
Build the per-frame widget list for the given state and frame.
@spec status_line(ExAthena.Chat.Session.t()) :: String.t()
Build the header status string from a session.