diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-03-28 22:17:14 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-03-28 22:17:14 +0300 |
| commit | 60baa765d942dcc40ee8bf0e58400aa634b6741a (patch) | |
| tree | c291c5ac494b46f4cd1addaf0a86485bc7bd78f5 /src/config.rs | |
| parent | 9c8eadc4927bbfb5328c6e4842c4682d408a0576 (diff) | |
feat: block nested herdr instances by default
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index c1195a24..88092955 100644 --- a/src/config.rs +++ b/src/config.rs @@ -18,6 +18,7 @@ pub struct Config { pub onboarding: Option<bool>, pub keys: KeysConfig, pub ui: UiConfig, + pub advanced: AdvancedConfig, } #[derive(Debug)] @@ -66,6 +67,13 @@ pub struct UiConfig { pub sound: SoundConfig, } +#[derive(Debug, Default, Deserialize)] +#[serde(default)] +pub struct AdvancedConfig { + /// Allow launching herdr inside an existing herdr pane. Default: false. + pub allow_nested: bool, +} + #[derive(Debug, Clone, Deserialize)] #[serde(default)] pub struct SoundConfig { @@ -921,4 +929,14 @@ claude = "on" assert_eq!(config.ui.sound.agents.claude, AgentSoundSetting::On); assert_eq!(config.ui.sound.agents.pi, AgentSoundSetting::Default); } + + #[test] + fn advanced_allow_nested_parses() { + let toml = r#" +[advanced] +allow_nested = true +"#; + let config: Config = toml::from_str(toml).unwrap(); + assert!(config.advanced.allow_nested); + } } |
