Skip to content

Commit 9b3a2b7

Browse files
Add set_security_analyzer abstract method to BaseConversation (#1772)
Co-authored-by: openhands <openhands@all-hands.dev>
1 parent 3c95cd8 commit 9b3a2b7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

openhands-sdk/openhands/sdk/conversation/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ def set_confirmation_policy(self, policy: ConfirmationPolicyBase) -> None:
162162
"""Set the confirmation policy for the conversation."""
163163
...
164164

165+
@abstractmethod
166+
def set_security_analyzer(self, analyzer: SecurityAnalyzerBase | None) -> None:
167+
"""Set the security analyzer for the conversation."""
168+
...
169+
165170
@property
166171
def confirmation_policy_active(self) -> bool:
167172
return not isinstance(self.state.confirmation_policy, NeverConfirm)

tests/sdk/conversation/test_base_span_management.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ def send_message(self, message: Any, sender: str | None = None) -> None:
4646
def set_confirmation_policy(self, policy: Any) -> None:
4747
pass
4848

49+
def set_security_analyzer(self, analyzer: Any) -> None:
50+
pass
51+
4952
@property
5053
def state(self) -> Any:
5154
return MagicMock()

0 commit comments

Comments
 (0)