Skip to main content

Module app

Module app 

Source
Expand description

Application state, message types, and event dispatch (The Elm architecture/TEA).

App holds the mutable session and prompt state. Msg represents input, provider, tool, permission, and lifecycle events. update applies one message and may return another message for the caller to process.

The root module declares the shared state and message vocabulary. The child modules implement the event families that update dispatches:

  • onboarding handles provider setup, credential recovery, and OAuth.
  • input handles editing, history, pickers, and prompt submission.
  • commands handles slash-command parsing and command actions.
  • context handles context inspection and compaction operations.
  • agent_lifecycle handles agent events and session persistence.

Structs§

App
The full application state used to draw the screen.
ChatGptOAuthDriver
Small seam for testing TUI OAuth without real network calls.
ChatGptOAuthRecovery
ChatGPT OAuth state shown in the focused recovery surface.
DetailPane
Lines to render when a tool detail pane is open.
FirstRunRecovery
Focused first-run and credential recovery surface.
PickerItem
PickerState
TurnTtftState
Client-observed time-to-first-token state for the active and last turn.

Enums§

AgentEvent
Events from the background agent stream.
ChatGptOAuthMethod
ChatGPT OAuth method selected by the user.
Entry
One transcript row.
FilePickerSource
Mode
Top-level interaction mode.
Msg
The single message type fed into update.
PromptAccessory
PromptState
The user-facing prompt state, derived from RunState and the transcript.
QueueTarget
Where input submitted during an active run should be queued.
RecoveryStage
Step within the first-run recovery surface.
RunState
Semantic run state, used for the status line.
ToolStatus
Status of an executed tool call.

Constants§

CONTEXT_INSPECTION_MAX_ITEMS
VISIBLE_ROWS

Functions§

command_suggestions_for_app
setup_model_options
start_auto_compaction
Start an automatic compaction triggered by preflight context pressure.
update
The only mutation path. Returns an optional follow-up message.