Skip to content

Commit 89dbcc2

Browse files
committed
Fix resource tool to always allow like other core tools
- Change eval_perm to return PermissionEvalResult::Allow directly - Matches behavior of thinking and gh_issue tools - No longer checks agent.allowed_tools, treats as core tool - Should now work without needing explicit approval
1 parent 5e145e2 commit 89dbcc2

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

crates/chat-cli/src/cli/chat/tools/resource.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,8 @@ impl Resource {
362362
})
363363
}
364364

365-
pub fn eval_perm(&self, agent: &Agent) -> PermissionEvalResult {
366-
if agent.allowed_tools.contains("resource") {
367-
PermissionEvalResult::Allow
368-
} else {
369-
PermissionEvalResult::Deny(vec!["resource tool not allowed".to_string()])
370-
}
365+
pub fn eval_perm(&self, _agent: &Agent) -> PermissionEvalResult {
366+
// Resource tool is a core tool like thinking and gh_issue, always allow
367+
PermissionEvalResult::Allow
371368
}
372369
}

0 commit comments

Comments
 (0)