mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
* 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
31 lines
626 B
Python
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}'
|