aboutsummaryrefslogtreecommitdiff
path: root/src/config/model.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-16 18:41:36 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-16 18:41:36 +0300
commitb173a86e34343a94c2941fa960b9c7e6a3bcb26a (patch)
tree79c663eec285f5181ffd06d03261e7d33221f4c4 /src/config/model.rs
parent7b8f6990837ed2df63b533c7bbcd5bf6835efef7 (diff)
feat: add immediate new tab option
refs #123
Diffstat (limited to 'src/config/model.rs')
-rw-r--r--src/config/model.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/config/model.rs b/src/config/model.rs
index f389b18b..f9522e41 100644
--- a/src/config/model.rs
+++ b/src/config/model.rs
@@ -150,6 +150,8 @@ pub struct UiConfig {
pub mouse_capture: bool,
/// Ask for confirmation before closing a workspace. Default: true.
pub confirm_close: bool,
+ /// Ask for a tab name before creating a new tab. Default: true.
+ pub prompt_new_tab_name: bool,
/// Show agent labels in split pane borders when no manual pane label is set. Default: false.
pub show_agent_labels_on_pane_borders: bool,
/// Agent sidebar scope. Saved values are "current" or "all". Default: "all".
@@ -223,6 +225,7 @@ impl Default for UiConfig {
sidebar_width: 26,
mouse_capture: true,
confirm_close: true,
+ prompt_new_tab_name: true,
show_agent_labels_on_pane_borders: false,
agent_panel_scope: AgentPanelScopeConfig::All,
accent: "cyan".into(),
@@ -298,6 +301,19 @@ show_agent_labels_on_pane_borders = true
}
#[test]
+ fn prompt_new_tab_name_defaults_on_and_parses() {
+ let default_config = Config::default();
+ assert!(default_config.ui.prompt_new_tab_name);
+
+ let toml = r#"
+[ui]
+prompt_new_tab_name = false
+"#;
+ let config: Config = toml::from_str(toml).unwrap();
+ assert!(!config.ui.prompt_new_tab_name);
+ }
+
+ #[test]
fn mouse_capture_default_on_and_parse() {
let default_config = Config::default();
assert!(default_config.ui.mouse_capture);