mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-04-29 03:00:45 -04:00
* [feat] confirmation mode for bash actions * feat: Add modal setting for Confirmation Mode * fix: frontend tests for confirmation mode switch * fix: add missing CONFIRMATION_MODE value in SettingsModal.test.tsx * fix: update test to integrate new setting * feat: Implement user confirmation for running bash/python code * fix: don't display rejected actions * fix: linting, rename/refactor based on feedback * fix: add property only to commands, pass serialization tests * fix: package-lock.json, lint test_action_serialization.py * test: add is_confirmed to integration test outputs --------- Co-authored-by: Mislav Balunovic <mislav.balunovic@gmail.com>
52 lines
985 B
Python
52 lines
985 B
Python
from enum import Enum
|
|
|
|
|
|
class AgentState(str, Enum):
|
|
LOADING = 'loading'
|
|
"""The agent is loading.
|
|
"""
|
|
|
|
INIT = 'init'
|
|
"""The agent is initialized.
|
|
"""
|
|
|
|
RUNNING = 'running'
|
|
"""The agent is running.
|
|
"""
|
|
|
|
AWAITING_USER_INPUT = 'awaiting_user_input'
|
|
"""The agent is awaiting user input.
|
|
"""
|
|
|
|
PAUSED = 'paused'
|
|
"""The agent is paused.
|
|
"""
|
|
|
|
STOPPED = 'stopped'
|
|
"""The agent is stopped.
|
|
"""
|
|
|
|
FINISHED = 'finished'
|
|
"""The agent is finished with the current task.
|
|
"""
|
|
|
|
REJECTED = 'rejected'
|
|
"""The agent rejects the task.
|
|
"""
|
|
|
|
ERROR = 'error'
|
|
"""An error occurred during the task.
|
|
"""
|
|
|
|
AWAITING_USER_CONFIRMATION = 'awaiting_user_confirmation'
|
|
"""The agent is awaiting user confirmation.
|
|
"""
|
|
|
|
USER_CONFIRMED = 'user_confirmed'
|
|
"""The user confirmed the agent's action.
|
|
"""
|
|
|
|
USER_REJECTED = 'user_rejected'
|
|
"""The user rejected the agent's action.
|
|
"""
|