mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 13:52:43 +08:00
* add outline of agent * add plan class * add initial prompt * plumb plan through a bit * refactor state management * move task into state * fix errors * add prompt parsing * add task actions * better serialization * more serialization hacks * fix fn * fix recursion error * refine prompt * better description of run * update prompt * tighter planning mechanism * prompt tweaks * fix merge * fix lint issues * add error handling for tasks * add graphic for plans * remove base_path from file actions * rename subtask to task * better planning * prompt updates for verification * remove verify field * ruff * mypy * fix actions
21 lines
538 B
Python
21 lines
538 B
Python
from dataclasses import dataclass, field
|
|
from typing import List, Tuple
|
|
|
|
from opendevin.plan import Plan
|
|
|
|
from opendevin.action import (
|
|
Action,
|
|
)
|
|
from opendevin.observation import (
|
|
Observation,
|
|
CmdOutputObservation,
|
|
)
|
|
|
|
@dataclass
|
|
class State:
|
|
plan: Plan
|
|
iteration: int = 0
|
|
background_commands_obs: List[CmdOutputObservation] = field(default_factory=list)
|
|
history: List[Tuple[Action, Observation]] = field(default_factory=list)
|
|
updated_info: List[Tuple[Action, Observation]] = field(default_factory=list)
|