feat: expose disableSkillShellExecution setting in config UI (closes #259)

This commit is contained in:
2026-04-13 10:19:50 -07:00
committed by Naomi Carrigan
parent 54b3a524c4
commit edea33310b
6 changed files with 49 additions and 2 deletions
+11
View File
@@ -54,6 +54,9 @@ pub struct ClaudeStartOptions {
#[serde(default)]
pub session_name: Option<String>,
#[serde(default)]
pub disable_skill_shell_execution: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -203,6 +206,11 @@ pub struct HikariConfig {
#[serde(default)]
pub model_overrides: Option<HashMap<String, String>>,
/// Prevents skill scripts from executing shell commands (Claude Code v2.1.91+).
/// Passes `"disableSkillShellExecution": true` via the `--settings` flag.
#[serde(default)]
pub disable_skill_shell_execution: bool,
}
impl Default for HikariConfig {
@@ -254,6 +262,7 @@ impl Default for HikariConfig {
enable_claudeai_mcp_servers: true,
auto_memory_directory: None,
model_overrides: None,
disable_skill_shell_execution: false,
}
}
}
@@ -405,6 +414,7 @@ mod tests {
assert!(config.enable_claudeai_mcp_servers);
assert!(config.auto_memory_directory.is_none());
assert!(config.model_overrides.is_none());
assert!(!config.disable_skill_shell_execution);
}
#[test]
@@ -459,6 +469,7 @@ mod tests {
"claude-opus-4-6".to_string(),
"arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-opus-4-6-v1".to_string(),
)])),
disable_skill_shell_execution: true,
};
let json = serde_json::to_string(&config).unwrap();
+14 -2
View File
@@ -316,7 +316,7 @@ impl WslBridge {
.map(|m| !m.is_empty())
.unwrap_or(false);
if has_memory_dir || has_overrides {
if has_memory_dir || has_overrides || options.disable_skill_shell_execution {
let mut settings = serde_json::Map::new();
if let Some(ref dir) = options.auto_memory_directory {
if !dir.is_empty() {
@@ -333,6 +333,12 @@ impl WslBridge {
}
}
}
if options.disable_skill_shell_execution {
settings.insert(
"disableSkillShellExecution".to_string(),
serde_json::Value::Bool(true),
);
}
if let Ok(settings_json) = serde_json::to_string(&settings) {
cmd.args(["--settings", &settings_json]);
}
@@ -503,7 +509,7 @@ impl WslBridge {
.map(|m| !m.is_empty())
.unwrap_or(false);
if has_memory_dir || has_overrides {
if has_memory_dir || has_overrides || options.disable_skill_shell_execution {
let mut settings = serde_json::Map::new();
if let Some(ref dir) = options.auto_memory_directory {
if !dir.is_empty() {
@@ -520,6 +526,12 @@ impl WslBridge {
}
}
}
if options.disable_skill_shell_execution {
settings.insert(
"disableSkillShellExecution".to_string(),
serde_json::Value::Bool(true),
);
}
if let Ok(settings_json) = serde_json::to_string(&settings) {
let escaped = settings_json.replace('\'', "'\\''");
claude_cmd.push_str(&format!(" --settings '{}'", escaped));