Expand description
UI-facing event and action types.
UiEvent flows from the agent backend → UI thread; the UI applies
them to crate::tui::app::App state. UserAction flows the other way
— the UI thread captures key events and the
crate::tui::backend::Backend worker dispatches them onto the
AgentRuntime.
Goal-144 widens this surface from goal-143’s four variants to
consume seven extra AgentEvent flavours: streaming partial
tokens, completed assistant text, token usage, latency, transcript
compaction and id-paired tool call/result events.
Goal-161 adds a separate PermissionRequest side-channel (not
part of UiEvent) because it carries a oneshot::Sender<bool> which
cannot implement PartialEq. The backend exposes a
perm_rx: mpsc::UnboundedReceiver<PermissionRequest> alongside
event_rx; the main event loop polls both.
Structs§
- Permission
Request - A pending permission request bubbled up from the
TuiPermissionHookrunning inside the backend worker. Carried on a dedicated side-channel (separate fromUiEvent) becauseoneshot::Senderis notPartialEq.
Enums§
- UiEvent
- Events bubbled up from the backend worker into the UI loop.
- User
Action - Actions originating from key events that the backend worker must
service against the [
recursive::AgentRuntime].