Files
OpenHands/opendevin/events/action/message.py
Xingyao Wang e731048ccf Improve action and observation logging for the CLI interface (#2035)
* properly log user messages;
format browser action/obs, summarize action, messages properly for logging

* add source to message

* add spaces for printing
2024-05-24 08:21:25 -04:00

22 lines
465 B
Python

from dataclasses import dataclass
from opendevin.core.schema import ActionType
from .action import Action
@dataclass
class MessageAction(Action):
content: str
wait_for_response: bool = False
action: str = ActionType.MESSAGE
@property
def message(self) -> str:
return self.content
def __str__(self) -> str:
ret = f'**MessageAction** (source={self.source})\n'
ret += f'CONTENT: {self.content}'
return ret