ModelNames returns the profile names sorted, so the popover cycles deterministically regardless of map iteration order.
()
| 345 | // ModelNames returns the profile names sorted, so the popover cycles |
| 346 | // deterministically regardless of map iteration order. |
| 347 | func (c *Config) ModelNames() []string { |
| 348 | return slices.Sorted(maps.Keys(c.Models)) |
| 349 | } |
| 350 | |
| 351 | // SetActive switches the active profile and persists. Fails on an unknown name, |
| 352 | // no silent coercion. On Save failure it reverts in-memory Active so the live |
no outgoing calls