Add a pattern-based rule for tool confirmations. Args: pattern: Glob pattern for tool names action: 'always', 'never', or risk level
(self, pattern: str, action: str)
| 427 | return False |
| 428 | |
| 429 | def add_tool_pattern(self, pattern: str, action: str) -> None: |
| 430 | """Add a pattern-based rule for tool confirmations. |
| 431 | |
| 432 | Args: |
| 433 | pattern: Glob pattern for tool names |
| 434 | action: 'always', 'never', or risk level |
| 435 | """ |
| 436 | rule = ToolPatternRule(pattern=pattern, action=action) |
| 437 | self.preferences.ui.tool_confirmation.patterns.append(rule) |
| 438 | self.save_preferences() |
| 439 | |
| 440 | def remove_tool_pattern(self, pattern: str) -> bool: |
| 441 | """Remove a pattern-based rule. |