mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 05:37:20 +08:00
fix previous merge
This commit is contained in:
@@ -182,8 +182,6 @@ class AgentController:
|
||||
logger.info(event, extra={'msg_type': 'OBSERVATION'})
|
||||
elif isinstance(event, AgentDelegateObservation):
|
||||
logger.info(event, extra={'msg_type': 'OBSERVATION'})
|
||||
elif isinstance(event, ErrorObservation):
|
||||
logger.info(event, extra={'msg_type': 'OBSERVATION'})
|
||||
self.state.history.on_event(event)
|
||||
|
||||
def reset_task(self):
|
||||
@@ -325,13 +323,11 @@ class AgentController:
|
||||
if action.runnable:
|
||||
self._pending_action = action
|
||||
|
||||
await self.update_state_after_step()
|
||||
|
||||
if not isinstance(action, NullAction):
|
||||
self.event_stream.add_event(action, EventSource.AGENT)
|
||||
|
||||
await self.update_state_after_step()
|
||||
if self.state.agent_state == AgentState.ERROR:
|
||||
return
|
||||
|
||||
if self._is_stuck():
|
||||
await self.report_error('Agent got stuck in a loop')
|
||||
await self.set_agent_state_to(AgentState.ERROR)
|
||||
|
||||
Reference in New Issue
Block a user