generated from nhcarrigan/template
fix: critical permission modal and config issues #127
@@ -1218,6 +1218,12 @@ fn process_json_line(
|
||||
if let Some(denials) = permission_denials {
|
||||
// Only process if there are actually denials
|
||||
if !denials.is_empty() {
|
||||
// Skip permission prompts if the result was successful - tools were already approved
|
||||
if subtype == "success" {
|
||||
emit_state_change(app, state, None, conversation_id.clone());
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let mut regular_permission_requests = Vec::new();
|
||||
|
||||
// Get denied tool IDs for later comparison
|
||||
@@ -1310,6 +1316,10 @@ fn process_json_line(
|
||||
// Check for sibling tools that may have been cancelled
|
||||
// Add them to the permission batch so they can be approved together
|
||||
for tool_use in captured_pending_tools.iter() {
|
||||
// Skip system tools that should never require permission
|
||||
if is_system_tool(&tool_use.tool_name) {
|
||||
continue;
|
||||
}
|
||||
// Only add tools that weren't explicitly denied (these are likely cancelled siblings)
|
||||
if !denied_tool_ids.contains(&tool_use.tool_use_id) {
|
||||
let description = format_tool_description(&tool_use.tool_name, &tool_use.tool_input);
|
||||
|
||||
Reference in New Issue
Block a user