()
| 357 | ok bool |
| 358 | baseURL string |
| 359 | } |
| 360 | |
| 361 | // quitArmResetMsg fires ~3s after Ctrl+C arms the quit: if not already quit or |
| 362 | // re-armed, clear the hint from the status bar. |
| 363 | type quitArmResetMsg struct{} |
| 364 | |
| 365 | func (m Model) Init() tea.Cmd { |
| 366 | // Keyed (cloud) profiles get a silent Probe at startup so the status bar |
| 367 | // renders the live budget / context window from the first frame. Keyless |
| 368 | // (local Ollama) profiles get the cheaper Reachable ping: no headers to |
| 369 | // harvest, so a full probe would buy nothing. |
| 370 | connectivity := pingBackend(m.cli.BaseURL) |
| 371 | if p := m.cfg.ActiveProfile(); p != nil && p.ResolvedKey() != "" { |
| 372 | connectivity = probeBackend(m.cli, m.cfg.Active, true) |
| 373 | } |
| 374 | return tea.Batch( |
| 375 | textarea.Blink, |
| 376 | m.spinner.Tick, |
nothing calls this directly
no test coverage detected