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:
onboardinghandles provider setup, credential recovery, and OAuth.inputhandles editing, history, pickers, and prompt submission.commandshandles slash-command parsing and command actions.contexthandles context inspection and compaction operations.agent_lifecyclehandles agent events and session persistence.
Structs§
- App
- The full application state used to draw the screen.
- Chat
GptO Auth Driver - Small seam for testing TUI OAuth without real network calls.
- Chat
GptO Auth Recovery - ChatGPT OAuth state shown in the focused recovery surface.
- Detail
Pane - Lines to render when a tool detail pane is open.
- First
RunRecovery - Focused first-run and credential recovery surface.
- Picker
Item - Picker
State - Turn
Ttft State - Client-observed time-to-first-token state for the active and last turn.
Enums§
- Agent
Event - Events from the background agent stream.
- Chat
GptO Auth Method - ChatGPT OAuth method selected by the user.
- Entry
- One transcript row.
- File
Picker Source - Mode
- Top-level interaction mode.
- Msg
- The single message type fed into
update. - Prompt
Accessory - Prompt
State - The user-facing prompt state, derived from
RunStateand the transcript. - Queue
Target - Where input submitted during an active run should be queued.
- Recovery
Stage - Step within the first-run recovery surface.
- RunState
- Semantic run state, used for the status line.
- Tool
Status - Status of an executed tool call.
Constants§
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.