From db67e9d74ffafc9c63bdf78fcf712419359f634b Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sat, 23 May 2026 21:27:26 +0300 Subject: feat: restore agent sessions refs #233 --- src/config/io.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/config/io.rs') diff --git a/src/config/io.rs b/src/config/io.rs index fe415d1c..2c6d78ab 100644 --- a/src/config/io.rs +++ b/src/config/io.rs @@ -173,6 +173,14 @@ fn load_live_config_from_str(content: &str) -> Result> &mut invalid_sections, |section| config.terminal = section, ); + load_live_section( + table, + "session", + "session config", + &mut diagnostics, + &mut invalid_sections, + |section| config.session = section, + ); load_live_section( table, "ui", @@ -463,6 +471,21 @@ mod tests { ); } + #[test] + fn load_live_config_parses_session_section() { + let loaded = load_live_config_from_str( + r#" +[session] +resume_agents_on_restore = true +"#, + ) + .unwrap(); + + assert!(loaded.config.session.resume_agents_on_restore); + assert!(loaded.diagnostics.is_empty()); + assert!(loaded.invalid_sections.is_empty()); + } + #[test] fn remove_keybinding_config_sections_removes_keys_tables_only() { let content = r#"onboarding = false -- cgit v1.2.3