Set whether to confirm tools at a specific risk level. Args: risk_level: 'safe', 'moderate', or 'high' should_confirm: Whether to confirm tools at this risk level
(self, risk_level: str, should_confirm: bool)
| 457 | return False |
| 458 | |
| 459 | def set_risk_threshold(self, risk_level: str, should_confirm: bool) -> None: |
| 460 | """Set whether to confirm tools at a specific risk level. |
| 461 | |
| 462 | Args: |
| 463 | risk_level: 'safe', 'moderate', or 'high' |
| 464 | should_confirm: Whether to confirm tools at this risk level |
| 465 | """ |
| 466 | try: |
| 467 | level = ToolRiskLevel(risk_level) |
| 468 | except ValueError: |
| 469 | raise ValueError(f"Invalid risk level: {risk_level}") |
| 470 | self.preferences.ui.tool_confirmation.risk_thresholds[level] = should_confirm |
| 471 | self.save_preferences() |
| 472 | |
| 473 | def get_active_provider(self) -> str | None: |
| 474 | """Get active provider.""" |