mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
main.py: Fix redundant ChangeAgentStateAction (#2064)
This commit is contained in:
@@ -10,7 +10,7 @@ from opendevin.core.config import args, get_llm_config_arg
|
||||
from opendevin.core.logger import opendevin_logger as logger
|
||||
from opendevin.core.schema import AgentState
|
||||
from opendevin.events import EventSource, EventStream, EventStreamSubscriber
|
||||
from opendevin.events.action import ChangeAgentStateAction, MessageAction
|
||||
from opendevin.events.action import MessageAction
|
||||
from opendevin.events.event import Event
|
||||
from opendevin.events.observation import AgentStateChangedObservation
|
||||
from opendevin.llm.llm import LLM
|
||||
@@ -93,9 +93,6 @@ async def main(
|
||||
runtime.init_sandbox_plugins(controller.agent.sandbox_plugins)
|
||||
|
||||
await event_stream.add_event(MessageAction(content=task), EventSource.USER)
|
||||
await event_stream.add_event(
|
||||
ChangeAgentStateAction(agent_state=AgentState.RUNNING), EventSource.USER
|
||||
)
|
||||
|
||||
async def on_event(event: Event):
|
||||
if isinstance(event, AgentStateChangedObservation):
|
||||
|
||||
Reference in New Issue
Block a user