fix: return "deny" on approval callback timeout instead of None
_approval_callback() had no return statement after the timeout break,
causing it to return None. Callers expect a string ("once", "session",
"always", or "deny"), so None could lead to undefined behavior when
approving dangerous commands.
This commit is contained in:
parent
41877183bc
commit
70cffa4d3b
1 changed files with 2 additions and 0 deletions
2
cli.py
2
cli.py
|
|
@ -2245,6 +2245,8 @@ class HermesCLI:
|
|||
self._approval_state = None
|
||||
self._approval_deadline = 0
|
||||
self._invalidate()
|
||||
return "deny"
|
||||
|
||||
def chat(self, message, images: list = None) -> Optional[str]:
|
||||
"""
|
||||
Send a message to the agent and get a response.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue