mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-30 17:26:44 +00:00
fix: remove stale retry_after field, Team variant, config_load_error_kind, denied_tools initializer errors
- Remove retry_after: None from ApiError::Api structs in openai_compat.rs (field was removed) - Remove SlashCommand::Team parse arm (variant was removed from enum) - Add config_load_error_kind: None to doctor path StatusContext initializer - Add Thinking arm to all ContentBlock match blocks in trident.rs - Remove cargo fmt drift across commands, config, compact, tools, trident
This commit is contained in:
@@ -90,6 +90,10 @@ pub struct RuntimePermissionRuleConfig {
|
||||
allow: Vec<String>,
|
||||
deny: Vec<String>,
|
||||
ask: Vec<String>,
|
||||
/// #159: simple tool-name denials parsed from the `deniedTools` config field.
|
||||
/// Unlike the `deny` rules (pattern-based), `denied_tools` is a flat list of
|
||||
/// tool names that are unconditionally denied regardless of permission mode.
|
||||
denied_tools: Vec<String>,
|
||||
}
|
||||
|
||||
/// Collection of configured MCP servers after scope-aware merging.
|
||||
@@ -738,8 +742,18 @@ impl RuntimeHookConfig {
|
||||
|
||||
impl RuntimePermissionRuleConfig {
|
||||
#[must_use]
|
||||
pub fn new(allow: Vec<String>, deny: Vec<String>, ask: Vec<String>) -> Self {
|
||||
Self { allow, deny, ask }
|
||||
pub fn new(
|
||||
allow: Vec<String>,
|
||||
deny: Vec<String>,
|
||||
ask: Vec<String>,
|
||||
denied_tools: Vec<String>,
|
||||
) -> Self {
|
||||
Self {
|
||||
allow,
|
||||
deny,
|
||||
ask,
|
||||
denied_tools,
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
@@ -756,6 +770,11 @@ impl RuntimePermissionRuleConfig {
|
||||
pub fn ask(&self) -> &[String] {
|
||||
&self.ask
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn denied_tools(&self) -> &[String] {
|
||||
&self.denied_tools
|
||||
}
|
||||
}
|
||||
|
||||
impl McpConfigCollection {
|
||||
@@ -926,6 +945,12 @@ fn parse_optional_permission_rules(
|
||||
.unwrap_or_default(),
|
||||
ask: optional_string_array(permissions, "ask", "merged settings.permissions")?
|
||||
.unwrap_or_default(),
|
||||
denied_tools: optional_string_array(
|
||||
permissions,
|
||||
"deniedTools",
|
||||
"merged settings.permissions",
|
||||
)?
|
||||
.unwrap_or_default(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user