Public declaration syntax from harness-tui-kit/src/components/system/settings_palette.rs Original source SHA-256: 42ad1486ed3c22b32ae732cb5537d400d8150c2f2cbbaba616f70d3019e82ce9 Function bodies and constant values are omitted. This is not the complete implementation. Source line 39 #[derive(Debug, Clone, PartialEq, Eq, Default)] pub enum SettingsPalettePage { /// Top-level menu (Modes / Providers / …). #[default] Root, /// Mode picker. Modes, /// Provider picker. Providers, /// Per-provider hub: drills into Models or Settings for the /// chosen provider. Replaces the old special-case Flocks page — /// every provider now goes through this same hub. Provider { provider_id: String }, /// Models for a specific provider. Models { provider_id: String }, /// Provider-specific settings (api keys, base URLs, Flocks CLI /// selection, etc.). Field metadata comes from the adapter. ProviderSettings { provider_id: String }, /// Flocks CLI picker — only reachable from /// `ProviderSettings { provider_id == "flocks" }`. FlocksClis, /// Models for a specific Flocks CLI. FlocksModels { cli_id: String }, } Source line 66 #[must_use] pub fn title(&self) -> String; Source line 82 #[derive(Debug, Clone)] pub struct SettingsPaletteItem { /// Stable identifier — passed back to the runtime when this row /// is selected. pub id: String, /// Primary label. pub label: String, /// Optional secondary description (rendered dim, after the label). pub description: String, /// `true` if the row represents the *currently-active* selection /// — gets a check glyph and accent color. pub active: bool, /// `true` if picking this row drills into a sub-page rather than /// applying a value directly. Drill-in rows show a `›` glyph. pub drills_in: bool, /// Optional badge rendered to the right of the row (e.g. /// `"healthy"`, `"offline"`, `"context: 1M"`). Dim by default. pub badge: String } Source line 104 #[must_use] pub fn leaf(id: impl Into, label: impl Into) -> Self; Source line 117 #[must_use] pub fn drill(id: impl Into, label: impl Into) -> Self; Source line 130 #[must_use] pub fn description(mut self, text: impl Into) -> Self; Source line 137 #[must_use] pub fn active(mut self, on: bool) -> Self; Source line 144 #[must_use] pub fn badge(mut self, text: impl Into) -> Self; Source line 152 #[derive(Debug, Clone, Default)] pub struct SettingsPaletteState { } Source line 167 #[derive(Debug, Clone, PartialEq, Eq)] pub struct PendingSelection { /// The page where the selection happened. pub page: SettingsPalettePage, /// The selected item's id. pub item_id: String } Source line 177 #[must_use] pub fn is_visible(&self) -> bool; Source line 183 #[must_use] pub fn page(&self) -> &SettingsPalettePage; Source line 189 #[must_use] pub fn cursor(&self) -> usize; Source line 195 #[must_use] pub fn filter(&self) -> &str; Source line 200 pub fn open(&mut self); Source line 210 pub fn close(&mut self); Source line 220 pub fn drill(&mut self, page: SettingsPalettePage); Source line 228 pub fn back(&mut self) -> bool; Source line 240 pub fn cursor_up(&mut self); Source line 245 pub fn cursor_down(&mut self, len: usize); Source line 254 pub fn filter_push(&mut self, ch: char); Source line 262 pub fn filter_pop(&mut self); Source line 268 pub fn filter_clear(&mut self); Source line 275 pub fn select(&mut self, item_id: impl Into); Source line 283 pub fn take_pending(&mut self) -> Option; Source line 290 #[derive(Debug, Clone)] pub struct SettingsPalette<'a> { } Source line 300 #[must_use] pub fn new(items: &'a [SettingsPaletteItem]) -> Self; Source line 310 #[must_use] pub fn theme(mut self, theme: &'a Theme) -> Self; Source line 317 #[must_use] pub fn hint(mut self, hint: &'a str) -> Self; Source line 324 #[must_use] pub fn filtered_indices(items: &[SettingsPaletteItem], filter: &str) -> Vec;