From 854b7e104ef838fb92980c938bacd08b30fd3a67 Mon Sep 17 00:00:00 2001 From: Smit Barmase Date: Thu, 21 Aug 2025 21:35:13 +0530 Subject: [PATCH] add editor_mode to agent settings Co-authored-by: Oleksiy Syvokon --- assets/settings/default.json | 6 +++++- crates/agent_settings/src/agent_settings.rs | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/assets/settings/default.json b/assets/settings/default.json index c290baf0038d1b731f041e9c828746758bf9ffe3..3f2b0a159f6da94db385615c09fd00104e47a2aa 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -885,7 +885,11 @@ /// Whether to have terminal cards in the agent panel expanded, showing the whole command output. /// /// Default: true - "expand_terminal_card": true + "expand_terminal_card": true, + /// Weather to inherit or override the editor mode for the agent panel. + /// + /// Default: inherit + "editor_mode": "inherit" }, // The settings for slash commands. "slash_commands": { diff --git a/crates/agent_settings/src/agent_settings.rs b/crates/agent_settings/src/agent_settings.rs index ed1ed2b89879c18eceaab22843390a766e4f6c77..88ef50505381e93b1c738b70b6509485840f68cf 100644 --- a/crates/agent_settings/src/agent_settings.rs +++ b/crates/agent_settings/src/agent_settings.rs @@ -48,6 +48,16 @@ pub enum NotifyWhenAgentWaiting { Never, } +#[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema, Default)] +pub enum AgentEditorMode { + Vim, + VimInsert, + Helix, + Default, + #[default] + Inherit, +} + #[derive(Default, Clone, Debug)] pub struct AgentSettings { pub enabled: bool, @@ -75,6 +85,7 @@ pub struct AgentSettings { pub expand_edit_card: bool, pub expand_terminal_card: bool, pub use_modifier_to_send: bool, + pub editor_mode: AgentEditorMode, } impl AgentSettings { @@ -315,6 +326,10 @@ pub struct AgentSettingsContent { /// /// Default: false use_modifier_to_send: Option, + /// Weather to inherit or override the editor mode for the agent panel. + /// + /// Default: inherit + editor_mode: Option, } #[derive(Clone, Copy, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Default)]