| 35 | ) |
| 36 | |
| 37 | type App struct { |
| 38 | ctx func() context.Context |
| 39 | |
| 40 | runtime runtime.Runtime |
| 41 | session *session.Session |
| 42 | firstMessage *string |
| 43 | firstMessageAttach string |
| 44 | queuedMessages []string |
| 45 | events chan tea.Msg |
| 46 | throttleDuration time.Duration |
| 47 | cancel context.CancelFunc |
| 48 | currentAgentModel string // Tracks the current agent's model ID from AgentInfoEvent |
| 49 | exitAfterFirstResponse bool // Exit TUI after first assistant response completes |
| 50 | readOnly bool // When true, no new messages can be sent to the LLM |
| 51 | titleGenerating atomic.Bool // True when title generation is in progress |
| 52 | titleGen *sessiontitle.Generator // Title generator for local runtime (nil for remote) |
| 53 | snapshotController builtins.SnapshotController // Drives /undo, /snapshots, /reset; nil for runtimes that don't capture snapshots |
| 54 | |
| 55 | startOnce sync.Once |
| 56 | subsMu sync.Mutex |
| 57 | subs []chan tea.Msg |
| 58 | fanoutOnce sync.Once |
| 59 | } |
| 60 | |
| 61 | // Opt is an option for creating a new App. |
| 62 | type Opt func(*App) |
nothing calls this directly
no outgoing calls
no test coverage detected