Documentation
¶
Overview ¶
Package settings is the full-screen /settings modal: a left nav sidebar (General, Models, MCP, Agents, Automations) beside a detail pane, keeping the top bar and a status row.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SectionIndex ¶
SectionIndex resolves a deep-link section name (as "/settings models" or CommandOutcome.SettingsSection would carry) to its nav index, case-insensitively. An empty name resolves to 0 (General): opening settings with no argument is not a deep link, it is the default. The caller - not this package - decides what an unresolved name means; commands.go's openSettingsScreen turns a false ok into a Notice rather than silently opening on General, so a typo'd deep link is never mistaken for "no argument was given".
Types ¶
type Screen ¶
Screen is the settings modal. It owns the frame (top bar, nav, status row); each section owns only its own detail body.
func New ¶
func New(t theme.Theme, tier theme.Tier, top topbar.Model, store ports.Settings, initialNav int) Screen
New builds the settings screen over store, opened on the section at initialNav (clamped into range - callers resolve a name to an index with SectionIndex first). Every store field may be nil; a nil field's section renders "unavailable" rather than the screen failing to build.
Sections are constructed EAGERLY, not lazily on first navigation: the app-wide theme walk (TestSelectingThemeLeavesNoValueOnTheOldTheme) only reaches values already live on the router, and a section built later would keep whatever theme it was born with.
func (Screen) OwnsQuit ¶
OwnsQuit reports true so the app router (app.OwnsQuit) forwards ctrl+c to this screen's own Update instead of quitting on the first press - the settings modal holds real in-flight state (cursor position, filters, a save in flight), unlike a quick pick-one-and-go dialog, so a stray ctrl+c must not discard it with no warning.