Files
OpenHands/opendevin/schema/action.py
Leo 1356da8795 feat: support controlling agent task state. (#1094)
* feat: support controlling agent task state.

* feat: add agent task state to agent status bar.

* feat: add agent task control bar to FE.

* Remove stop agent task action.

* Merge pause and resume buttons into one button; Add loading and disabled status for action buttons.

* Apply suggestions from code review

---------

Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-04-18 11:09:00 +00:00

69 lines
1.2 KiB
Python

from enum import Enum
class ActionType(str, Enum):
INIT = 'initialize'
"""Initializes the agent. Only sent by client.
"""
START = 'start'
"""Starts a new development task. Only sent by the client.
"""
READ = 'read'
"""Reads the content of a file.
"""
WRITE = 'write'
"""Writes the content to a file.
"""
RUN = 'run'
"""Runs a command.
"""
KILL = 'kill'
"""Kills a background command.
"""
BROWSE = 'browse'
"""Opens a web page.
"""
RECALL = 'recall'
"""Searches long-term memory
"""
THINK = 'think'
"""Allows the agent to make a plan, set a goal, or record thoughts
"""
FINISH = 'finish'
"""If you're absolutely certain that you've completed your task and have tested your work,
use the finish action to stop working.
"""
CHAT = 'chat'
SUMMARIZE = 'summarize'
ADD_TASK = 'add_task'
MODIFY_TASK = 'modify_task'
NULL = 'null'
PAUSE = 'pause'
"""Pauses the task.
"""
RESUME = 'resume'
"""Resumes the task.
"""
STOP = 'stop'
"""Stops the task. Must send a start action to restart a new task.
"""
CHANGE_TASK_STATE = 'change_task_state'