Skip to content

Commit 0c83dab

Browse files
authored
fix: inability to untrust read only tools (#471)
1 parent e797127 commit 0c83dab

File tree

1 file changed

+2
-2
lines changed
  • crates/chat-cli/src/cli/chat

1 file changed

+2
-2
lines changed

crates/chat-cli/src/cli/chat/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,8 +1605,8 @@ impl ChatSession {
16051605

16061606
// If there is an override, we will use it. Otherwise fall back to Tool's default.
16071607
let allowed = self.tool_permissions.trust_all
1608-
|| (self.tool_permissions.has(&tool.name) && self.tool_permissions.is_trusted(&tool.name))
1609-
|| !tool.tool.requires_acceptance(os);
1608+
|| self.tool_permissions.is_trusted(&tool.name)
1609+
|| (!self.tool_permissions.has(&tool.name) && !tool.tool.requires_acceptance(os));
16101610

16111611
if os
16121612
.database

0 commit comments

Comments
 (0)