generated from nhcarrigan/template
fix: critical permission modal and config issues #127
@@ -1225,7 +1225,17 @@ fn process_json_line(
|
|||||||
.map(|d| d.tool_use_id.clone())
|
.map(|d| d.tool_use_id.clone())
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
// Helper function to check if a tool is a system tool that should never require permission
|
||||||
|
let is_system_tool = |tool_name: &str| -> bool {
|
||||||
|
matches!(tool_name, "ExitPlanMode" | "EnterPlanMode")
|
||||||
|
};
|
||||||
|
|
||||||
for denial in denials {
|
for denial in denials {
|
||||||
|
// Skip system tools that should never require permission
|
||||||
|
if is_system_tool(&denial.tool_name) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Special handling for AskUserQuestion tool
|
// Special handling for AskUserQuestion tool
|
||||||
if denial.tool_name == "AskUserQuestion" {
|
if denial.tool_name == "AskUserQuestion" {
|
||||||
if let Some(questions) = denial
|
if let Some(questions) = denial
|
||||||
|
|||||||
Reference in New Issue
Block a user