probeBackend wraps llm.Client.Probe in a tea.Cmd, bounded by probeTimeout so a hung backend never freezes activation. silent=true (startup probe) skips the "✓ active" banner, just seeding live budget/ctx values.
(cli *llm.Client, profileName string, silent bool)
| 32 | silent bool // suppress the "✓ active" line; startup probe only |
| 33 | err error |
| 34 | } |
| 35 | |
| 36 | // probeBackend wraps llm.Client.Probe in a tea.Cmd, bounded by probeTimeout so |
| 37 | // a hung backend never freezes activation. silent=true (startup probe) skips |
| 38 | // the "✓ active" banner, just seeding live budget/ctx values. |
| 39 | func probeBackend(cli *llm.Client, profileName string, silent bool) tea.Cmd { |
| 40 | return func() tea.Msg { |
| 41 | ctx, cancel := context.WithTimeout(context.Background(), probeTimeout) |
| 42 | defer cancel() |
| 43 | res, err := cli.Probe(ctx) |
| 44 | return probeMsg{ |
| 45 | profile: profileName, |
| 46 | cli: cli, |
| 47 | contextWindow: res.ContextWindow, |
| 48 | budget: res.Budget, |
| 49 | silent: silent, |
| 50 | err: err, |
no test coverage detected