From 60baa765d942dcc40ee8bf0e58400aa634b6741a Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sat, 28 Mar 2026 22:17:14 +0300 Subject: feat: block nested herdr instances by default --- src/config.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/config.rs') 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, 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); + } } -- cgit v1.2.3