add editor_mode to agent settings

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
This commit is contained in:
Smit Barmase 2025-08-21 21:35:13 +05:30
parent 0d5becfadf
commit 854b7e104e
No known key found for this signature in database
2 changed files with 20 additions and 1 deletions

View file

@ -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": {

View file

@ -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<bool>,
/// Weather to inherit or override the editor mode for the agent panel.
///
/// Default: inherit
editor_mode: Option<AgentEditorMode>,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Default)]