mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(agent/tty): Fix finish command in TTY mode
- Prevent the Agent from treating `AgentTerminated` like it would any other exception raised by a command. - The agent should raise AgentTerminated exception to exit the loop.
This commit is contained in:
@@ -250,6 +250,8 @@ class Agent(
|
||||
self.context.add(context_item)
|
||||
|
||||
result = ActionSuccessResult(outputs=return_value)
|
||||
except AgentTerminated:
|
||||
raise
|
||||
except AgentException as e:
|
||||
result = ActionErrorResult.from_exception(e)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user