Set the global tool confirmation mode. Args: mode: One of 'always', 'never', or 'smart'
(self, mode: str)
| 268 | return self.preferences.ui.tool_confirmation.mode |
| 269 | |
| 270 | def set_tool_confirmation_mode(self, mode: str) -> None: |
| 271 | """Set the global tool confirmation mode. |
| 272 | |
| 273 | Args: |
| 274 | mode: One of 'always', 'never', or 'smart' |
| 275 | """ |
| 276 | try: |
| 277 | confirmation_mode = ConfirmationMode(mode) |
| 278 | except ValueError: |
| 279 | raise ValueError(f"Invalid confirmation mode: {mode}") |
| 280 | self.preferences.ui.tool_confirmation.mode = confirmation_mode |
| 281 | self.preferences.ui.confirm_tools = confirmation_mode != ConfirmationMode.NEVER |
| 282 | self.save_preferences() |
| 283 | |
| 284 | def get_tool_confirmation(self, tool_name: str) -> str | None: |
| 285 | """Get confirmation setting for a specific tool. |