diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-08-04 17:26:30 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-04 17:26:30 +0300 |
| commit | cc9fa47540d8525f24fe46a10f759ca40090a6e0 (patch) | |
| tree | ef6979a7d5168952dc2de8d7a68e42b3ad69c45b /src/config | |
| parent | 4473e391962c68d59bd980fa98a44f3397d9931d (diff) | |
feat(ui): add distinct status indicators (#2282)
refs #2260
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/model.rs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/config/model.rs b/src/config/model.rs index e56ac087..97b8c7fa 100644 --- a/src/config/model.rs +++ b/src/config/model.rs @@ -106,6 +106,23 @@ impl AgentPanelSortConfig { } } +#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize, Default)] +#[serde(rename_all = "lowercase")] +pub enum StatusIndicatorStyle { + #[default] + Dots, + Symbols, +} + +impl StatusIndicatorStyle { + pub fn as_str(self) -> &'static str { + match self { + Self::Dots => "dots", + Self::Symbols => "symbols", + } + } +} + #[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Deserialize, Serialize)] #[serde(rename_all = "lowercase")] pub enum HostCursorModeConfig { @@ -826,6 +843,8 @@ pub struct UiConfig { pub tab_bar_position: TabBarPositionConfig, /// Agent sidebar ordering. Saved values are "spaces" or "priority". Default: "spaces". pub agent_panel_sort: AgentPanelSortConfig, + /// Agent status indicator style. Saved values are "dots" or "symbols". Default: "dots". + pub status_indicators: StatusIndicatorStyle, /// Expanded sidebar row composition. pub sidebar: SidebarConfig, /// Accent color for highlights, borders, and navigation UI. @@ -1029,6 +1048,7 @@ impl Default for UiConfig { hide_tab_bar_when_single_tab: false, tab_bar_position: TabBarPositionConfig::Top, agent_panel_sort: AgentPanelSortConfig::Spaces, + status_indicators: StatusIndicatorStyle::Dots, sidebar: SidebarConfig::default(), accent: "cyan".into(), toast: ToastConfig::default(), @@ -1253,6 +1273,23 @@ agent_panel_scope = "current" } #[test] + fn status_indicator_style_defaults_to_dots_and_parses_symbols() { + assert_eq!( + Config::default().ui.status_indicators, + StatusIndicatorStyle::Dots + ); + + let config: Config = toml::from_str( + r#" +[ui] +status_indicators = "symbols" +"#, + ) + .unwrap(); + assert_eq!(config.ui.status_indicators, StatusIndicatorStyle::Symbols); + } + + #[test] fn pane_appearance_defaults_and_parse() { let default_config = Config::default(); assert!(default_config.ui.pane_borders); |
