Robert Brennan beb74a19f6
Use event stream for the runtime (#1776)
* rebuild PR from scratch

* fix max_iter

* regenerate tests

* cut down on history

* Update opendevin/controller/agent_controller.py

* regenerate tests

* revert swe agent

* revert some codeact chagnes

* regenerate tests

* add source to dict

* only add source if not none

* try to fix coverage issue

* lock

* add gevent
2024-05-14 13:35:25 +00:00

31 lines
626 B
Python

from dataclasses import dataclass, field
from opendevin.core.schema import ActionType
from .action import Action
@dataclass
class AddTaskAction(Action):
parent: str
goal: str
subtasks: list = field(default_factory=list)
thought: str = ''
action: str = ActionType.ADD_TASK
@property
def message(self) -> str:
return f'Added task: {self.goal}'
@dataclass
class ModifyTaskAction(Action):
task_id: str
state: str
thought: str = ''
action: str = ActionType.MODIFY_TASK
@property
def message(self) -> str:
return f'Set task {self.task_id} to {self.state}'