diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-23 21:27:26 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-23 21:37:05 +0300 |
| commit | db67e9d74ffafc9c63bdf78fcf712419359f634b (patch) | |
| tree | 9d181b55e65aaf6a2fad2d6cf785bb09a8d9748f /src/config/io.rs | |
| parent | 1bab1d2ce21507747ea1f506fb891fe7cd5a13c9 (diff) | |
feat: restore agent sessions
refs #233
Diffstat (limited to 'src/config/io.rs')
| -rw-r--r-- | src/config/io.rs | 23 |
1 files changed, 23 insertions, 0 deletions
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 @@ -175,6 +175,14 @@ fn load_live_config_from_str(content: &str) -> Result<LoadedConfig, Vec<String>> ); load_live_section( table, + "session", + "session config", + &mut diagnostics, + &mut invalid_sections, + |section| config.session = section, + ); + load_live_section( + table, "ui", "ui config", &mut diagnostics, @@ -464,6 +472,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 |
